 |
Linode.com Forum Linode Community Forums
|
| Author |
Message |
sethg
Joined: 26 Feb 2008
Posts: 2
|
| Posted: Tue Feb 26, 2008 11:01 pm Post subject: when APT is looking for the wrong version of a package |
|
|
I just set up my new Linode today, and got hit with a strange error: for certain packages (or dependencies), when I tried to install them, the package manager (apt-get or aptitude, I tried both) would look for the wrong version and complain about not finding it. For example, "aptitude install libpq4" yielded the error message Code: Failed to fetch http://ftp.us.debian.org/debian/pool/main/p/postgresql-8.1/libpq4_8.1.8-1_i386.deb: 404 Not Found [IP: 35.9.37.225 80] ... but when I went to that directory in a Web browser or searched on packages.debian.org, I saw that the most recent version of libpq4 was 8.1.11_0etch1. "aptitude update" did nothing to solve the problem.
I noticed that the offending version numbers were stored in the file "/var/lib/apt/lists/ftp.us.debian.org_debian_dists_stable_main_binary-i386_Packages". Finally (after backing up my /var partition), I moved that file over to /var/tmp and ran "aptitude update" again, which finally did update things so that I could load the right versions.
Investigating more closely: the Packages file that had been preinstalled on the disk image had a timestamp of "Feb 26 08:52" (not sure how that happened...) but the one that had been freshly downloaded had a timestamp of "Feb 16 09:19". I could have made the same repair by running "touch" to roll back the file's time stamp and then running "aptitude update".
So, as Arlo Guthrie said, because you yourself may be in a similar situation (and because Googling for my particular combination of error messages didn't give me much of a clue), I thought I'd tell the story of how I recovered from it. |
|
| Back to top |
|
irgeek
Joined: 21 Jun 2003
Posts: 99
Location: Denver, CO
|
| Posted: Wed Feb 27, 2008 1:28 am Post subject: |
|
|
You did update apt, right?
Code: $ sudo apt-get update |
|
| Back to top |
|
pclissold
Joined: 24 Oct 2003
Posts: 470
Location: Netherlands
|
| Posted: Wed Feb 27, 2008 4:07 am Post subject: Re: when APT is looking for the wrong version of a package |
|
|
sethg wrote: So, as Arlo Guthrie said, because you yourself may be in a similar situation (and because Googling for my particular combination of error messages didn't give me much of a clue), I thought I'd tell the story of how I recovered from it.
Could this have happened because you were in group w? |
|
| Back to top |
|
sethg
Joined: 26 Feb 2008
Posts: 2
|
| Posted: Wed Feb 27, 2008 8:48 am Post subject: |
|
|
irgeek: I did "apt-get update" as well as "aptitude update", also "...upgrade", and "...dist-upgrade". I even tried "aptitude reinstall apt".
pclissold: One unusual thing that I did as soon as I got the machine is to create a new partition and then copy all of /var onto it. I'm wondering if that did something to screw up the timestamps. |
|
| Back to top |
|
pclissold
Joined: 24 Oct 2003
Posts: 470
Location: Netherlands
|
| Posted: Wed Feb 27, 2008 12:14 pm Post subject: |
|
|
sethg wrote: pclissold: One unusual thing that I did as soon as I got the machine is to create a new partition and then copy all of /var onto it. I'm wondering if that did something to screw up the timestamps.
I'm afraid I was attempting humour, rather than help:
Arlo Guthrie wrote: And I proceeded to tell him the story of the twenty seven eight-by-ten colour glossy pictures with the circles and arrows and the paragraph on the back of each one, and he stopped me right there and said, "Kid, I want you to go and sit down on that bench that says Group W .... NOW kid!!"
And I, I walked over to the, to the bench there, and there it is: Group W's where they put you if you may not be moral enough to join the army after committing your special crime, .... |
|
| Back to top |
|
aaron
Joined: 12 Sep 2003
Posts: 27
|
| Posted: Thu Feb 28, 2008 4:11 pm Post subject: |
|
|
sethg wrote: One unusual thing that I did as soon as I got the machine is to create a new partition and then copy all of /var onto it. I'm wondering if that did something to screw up the timestamps.
Quite possibly. Did you use the -p or -a arguments when copying? (-p is short for --preserve=mode,owner,timestamps, -a is short for -dpR) |
|
| Back to top |
|
| |
|