1

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:

  1. 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?
  2. 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.
  3. From all I've read, it seems like a bad idea to delete the lockfile on the administration directory at this stage—right?
Flourish
  • 27
  • 7

1 Answers1

0

From question #2, you can use killall aptd to kill the processes, or a GUI task manager, then delete the lockfile, and restart your system. Should be fine as long as aptd and dpkg are not running.

Once you restart, you might not be able to use apt-get or dpkg again right away and it'll be locked again while it does its thing. Again, you will have to wait until they're done because the system updater will likely be looking for available updates. If you end up with a perma-lock again, then you have another issue with your system.

Delorean
  • 11,563