I'm trying to download something, and it's stuck on "waiting for apt-get to exit". Also, when I'm trying to use the terminal it says "unable to lock the administration directory" after I type in a command.
Asked
Active
Viewed 4.2k times
5
-
I got this after setting up auto-update in 18.04 and waiting 5-10 minutes was enough time for the lock to be released by the background update. – user5389726598465 May 25 '18 at 14:27
2 Answers
2
apt-get
is a tool for handling dpkg
packages and handles one package at a time. There's may be a case that your previous action is still engaging the apt-get
engine. Just like @karel suggested, 'close first and then only try another'
apt-get
thread was halted while executing, leaving apt
locked.
You'll need to delete the lock file with sudo rm /var/lib/apt/lists/lock
and also the lock file in cache directory with sudo rm /var/cache/apt/archives/lock

kern
- 1,439
-
1
-
Old topic but it still happens even in Ubuntu & Ubuntu PRO 22.04 in 2023. Solution: sudo killall apt apt-get. – Marius Nov 14 '23 at 01:04
0
Maybe you had two conflicting package download commands trying to run at the same time, so neither command would run. If so, try closing all your open windows, and then open only the Ubuntu Software Center and try again to install your package.

karel
- 114,770