Tuesday, August 1, 2017

dpkg - Can't uninstall PHPmyadmin in Ubuntu 16.04



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:






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

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...