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:

1 Answer 1

5

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
2
  • 1
    Attention: you might have to use sudo in other commands informed above, otherwise you might get "permission denied" message. Nov 4, 2018 at 0:22
  • @MarceloÁgil fixed. Nov 18, 2019 at 13:45

You must log in to answer this question.