While running sudo apt-get install alien
, there is an error: Unable lock administrator directory (/var/lib/dpkg/), is another process using it?
How do I fix this?
While running sudo apt-get install alien
, there is an error: Unable lock administrator directory (/var/lib/dpkg/), is another process using it?
How do I fix this?
It could be that some other package or package update is already downloading, and it hasn't finished downloading yet, so the /var/lib/dpkg/
directory is locked until it finishes. Try to install alien again in a couple of hours.
karel's answer should be correct in nearly every case... however, there are some cases where dpkg forgets to clean its lock after its done (it happened to me a couple of times), so then you have to remove it:
sudo rm -f /var/lib/dpkg/lock
But don't remove it unless you are certain dpkg isn't running:
ps -eo command | grep dpkg | grep -v 'grep' # If there is output, then it means
# dpkg is running