Following on from my last question...I am getting an error when I try to use apt-get to install software which reads "Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?" I am definitely using aptget correctly - sudo apt-get install PACKAGENAME
where PACKAGENAME is something I know is available on apt-get.
I have checked to see if apt is running using $ ps -e | grep apt
(thanks to the helpful Ubuntu user who responded to my last question!) and I get the following:
13973 ? 00:00:07 aptd
14589 pts/1 00:00:07 aptd
I understand this (thanks again helpful person!) to mean that there are multiple aptd running at once. Looking at other questions about this as well as the response to my own question, much of the advice is "wait a few minutes until it stops; this is pretty normal." But I've now waited over an hour, and the only change is that the first of the two response lines initially read 00:00:03 aptd
and now it reads 00:00:07 aptd
.
My questions:
- Am I being over-anxious, and should I just wait longer before trying to meddle with anything further—basically am I wrong to think it's abnormal that it would take this long for aptd to finish?
- If I'm not wrong and something needs to be done, what is the best way to proceed? From what I've read, it seems like the next step should be to kill aptd, but I'm not clear at all on that.
- From all I've read, it seems like a bad idea to delete the lockfile on the administration directory at this stage—right?
$ killall aptd aptd(13973): Operation not permitted aptd(14589): Operation not permitted aptd: no process found
(only, you know, with linebreaks). Hm. My instinct is tosudo killall aptd
but since I've got basically no idea what I'm doing I'm hesitant. I should also note that usingps -e | grep apt
I now see that the processes are listed as13973 ? 00:00:07 aptd
and14589 pts/1 00:00:10 aptd
, which is another change from before. Not knowing what the 00:00:07 or 00:00:10 bits mean, I can't tell if this is good or not. – Flourish Mar 23 '17 at 19:20sudo killall aptd
. It killed one of the two! So now I just have14589 ? 00:00:10 aptd
running when I check. This feels like a victory, but possibly a Pyrrhic victory. – Flourish Mar 23 '17 at 19:34aptd
ordpkg
running, delete the lock file. You can also run a kill on a PID usingsudo kill 14589
<- use the correct PID. – Delorean Mar 23 '17 at 19:36sudo kill 14589
does not seem to work - it's still coming up when I check. Meanwhile, I can't find anything via a GUI task manager. I guess a combination of waiting, and checking, and trying again is indicated. Thank you for your patience with this—I can't imagine how irritating it must be to basically be someone's tech support from afar! – Flourish Mar 23 '17 at 19:40I hope to someday be able to help someone as much as you're helping me, then. :)
– Flourish Mar 23 '17 at 19:42