apt corrupt ?
Before I begin, I'd just like to say hello to you all as this is my first post. I hope I can contribute something to the forum in future.
Background: I have a VM that has been running happily for the last couple of years running various services (mail, web, etc). A few months ago I decided to install a DNS server so I could redirect sub-domains to my home server. I ran into an issue with apt and can more or less no longer use the apt-get. I exceeded my time window and basically left it as is for the last few months. Observations (Issues with apt / versioning ?) : 1. I attempt to add or remove a package (any package) Code:
root@myhost:~# apt-get remove bind9 Code:
root@myhost:~# apt-get -f install Code:
root@myhost:~# apt-cache policy Code:
root@myhost:~# cat /etc/debian_version Code:
root@myhost:~# uname -a Code:
root@myhost:~# ls -alhtr /usr/lib/ | less Thanks. |
Have you tried running "apt-get clean" before your "apt-get -f install"? The second listing suggests that the packages you have cached might be corrupt.
|
Quote:
Code:
root@myhost:~# apt-get clean |
Does the clean definitely clear out /var/cache/apt/archives?
|
Quote:
Code:
root@myhost:~# ls /var/cache/apt/archives/ |
Sorry, was worth a try.
I'm sure somebody else will have some ideas. |
Quote:
It's probably also worth nothing that I do not have physical access to this server. |
The problem is that apt wants to install packages that aren't there anymore. Try
Code:
apt-get -f Code:
aptitude --get-selections > selections.txt Alternatively, you can get the oldstable package (Debian 6 is oldstable) via this link: http://packages.debian.org/squeeze/dselect Choose a mirror near you for the correct arch, fetch it with wget then use dpkg to install it. I noticed the errors you get are about missing paths too. You may want to create the required directories manually (use mkdir for that). Also, consider the --reinstall option of apt-get and run apt-get --check to see if the cache is consistent with what's on the system. |
Quote:
Thank you for your reply, but I didn't have any success with these commands. Code:
root@myhost:~# apt-get -f Everything checks out fine. Code:
root@myhost:~# apt-get -f check Code:
root@myhost:~# aptitude --get-selections > selections.txt |
My bad, replace aptitude with apt-get in those commands. Apols!
|
Quote:
Still no success with this one. Code:
root@myhost:/# apt-get --get-selections > selections.txt I tried updating libkrb5 using a downloaded .deb. But again errors with no such file or directory. Code:
root@myhost:/# dpkg -i libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb Code:
root@myhost:/# ls -alhtr /usr/lib/ | less Code:
root@myhost:/# ls -alhtr /usr/lib/ | less |
Right, I now see I've made a typo: the --get-selection is w/o the s on the end :( (so is --set-selection) Sorry!
As for the strange results for ls, I suspect you're on a shared server, right? In which case you probably have a chroot jail for your system and the sys-admin didn't install it proper, there may be sym-links missing. Inform your host. |
Quote:
|
S**t, I messed this one up quite badly. Really, really sorry, you need dpkg instead:
Code:
dpkg --get-selections > selections.txt /me feels very stupid now |
Quote:
This is the guts of your problem. Fix this and you can then install your package. As to how ..... not sure. Check 'mount' to be sure nothing wierd is mounted on it. Check it from a live environment or such (is there a "recovery console" or such?). Maybe fsck the disk. |
All times are GMT -5. The time now is 08:32 PM. |