Resolving apt-get error
Xubuntu 220.127.116.11 LTS 64bit
I encountered this problem today and I managed to resolve it with a few easy steps.
Here are the error lines I got while running sudo apt-get install [package name]
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?
If you try and search with the error lines, usually someone recommends to remove the lock file and the cached lock files.
This is not recommended as your go-to solution, merely a last resort. However, there is a safer way to get it working again.
And that is…
Try and find out if there’s any processes running with the word apt, apt-get or aptitude in it.
Killing these processes is harmless, unless it’s in the middle of installing packages.
ps aux | grep apt
This will show if there are processes running with the word apt.
So using kill with the process ID eg. 3072 may resolve your problem, it did for me.
In some cases you might need to try it with
kill -9 processID
By doing this it should kill the process(es) and maybe remove the lock.
ICT-Infrastructure student from Finland.
Learning Linux, DevOps and Docker…