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.