My friend has screwed up apt and I need advice on troubleshooting it
Trying to fix somebody else's problem long-distance when you are both in isolation is not easy. It becomes even more difficult when the person at the coalface doesn't fully understand what is going on. She has been using AntiX for two years now and does her own weekly updates using synaptic, but now she has a snafu.
She wasn't able to explain to me exactly how she got into this mess, but it must have been an interrupted update. The first thing we tried was a command line update using apt upgrade. It failed and instructed her to run dpkg --configure -a by hand, so she tried to do that, but it stalled. So I thought we'd try to get a list of what was pending and update packages individually until we find out which package is broken. I hoped to be able to use synaptic for that but it won't run. So I asked her to run dpkg --yet-to-unpack, hoping that would give us our list. It ran successfully but gave us nothing! I don't know much about the internals of apt, despite having been a Debian user for years, but I gather that unpacking goes to completion before any configuration is done. The break has obviously happened during this configuration stage. How do we find out what these packages are? Or alternatively, is there an emergency command that will clear the blockage. |
|
OK, she has now tried that. Unfortunately apt-get simply refuses to run. It just refers her back to a manual run of dpkg --configure -a. Which then freezes as before.
I'm sure we could crack this if we could use a more specific option than "-a". There must be one particular package in the pipeline that is breaking dpkg. If we could only find out what it is, it could be uninstalled and the rest of the update carried out properly. I'm not sure but I think this is the update that had all the wifi firmware in it. Where do downloaded packages go? And, more important, where do they get unpacked? Is there any kind of directory listing that would tell us what's in the pipeline? |
Quote:
Code:
dpkg -l | grep '^.[^ic]' |
|
Quote:
Quote:
|
Quote:
you may also try: apt clean, sometimes helps. |
Quote:
Quote:
I think I'll have to spend the next day or so exploring the options on my own AntiX system before going back to my friend. |
Quote:
|
Using aptitude is (probably) out. I've got AntiX running in front of me now and aptitude is not part of the default install so my friend won't have it either. I wouldn't want her to try installing it while the whole apt system is in such a mess.
On the other hand the dpkg -l|grep pipeline suggested by shruggy seems to work very well. So that is the next thing we shall try. I also had a look at the /var/lib/dpkg/status directory. Unfortunately it contains all installed packages so it's huge. But piping just the Status lines through more might yield something useful. I shall arrange another long-range session and report back. Thanks for all your help so far. |
If there's some breakage in /var/lib/dpkg/status then dpkg -C will probably catch it.
sudo dpkg -V also may reveal some clues, but it's 1) rather time-consuming, and 2) may generate too much noise. |
It seems that ssh is installed on AntiX by default.
Wouldn't that be the best option, make your friend start sshd and you can ssh into the machine and fix it? |
Quote:
It's definitely an idea for the future though. If I had a permanent account on that machine and a way of logging in, problems like this would be much easier to solve. I do have access to the root account actually but I bet sshd is configured by default not to allow remote root logins. It certainly would be on any machine of mine! |
Once in, you change to root using su.
It's not something I have any real experience of though, I just had a go at it a couple of times when I was in the inquisitive stage of using Linux/BSD. |
|
All times are GMT -5. The time now is 09:51 AM. |