2

My PHPmyadmin (PMA) install was stuck. I started a new session and when doing apt-get purge phpmyadmin I got:

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?

I ran these in Google and found two issues here; Highest answers suggest removing lock file (as well as it's cached version), but that didn't help:

| improve this question | | | | |
4

This answer should be tried as well for Ubuntu 16.04, I would advise to try it second:

cd /var/lib/dpkg/info/
sudo rm -r phpmyadmin.*
sudo apt-get clean
sudo apt-get update
sudo phpdismod mcrypt mbstring
sudo service apache2 restart
sudo sed -i 's/Include \/etc\/phpmyadmin\/apache.conf/ /g' /etc/apache2/apache2.conf 
sudo apt-get purge phpmyadmin -y
sudo apt autoremove
| improve this answer | | | | |
  • 1
    Attention: you might have to use sudo in other commands informed above, otherwise you might get "permission denied" message. – Marcelo Ágil Nov 4 '18 at 0:22
  • @MarceloÁgil fixed. – Neurotransmitter Nov 18 '19 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy