Unable to install anything on Ubuntu Server [duplicate]
Solution 1:
You have to change the postrm
to purge the package:
-
Open the file
sudo nano /var/lib/dpkg/info/mysql-server-5.5.postrm
-
Find the code snippet
if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then stop_server sleep 2 fi
and comment the line
stop_server
if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then # stop_server sleep 2 fi
-
Save the file and purge again
sudo apt-get purge mysql-server-5.5
After that, you have repaired your system and you can install and uninstall packages again.