instalando pacotes

0

Instalei o servidor MySQL e o cliente e o WordPress no meu Ubuntu e agora, quando quis remover esses pacotes, recebi o seguinte:

sudo apt-get remove mysql-client-5.6 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  mysql-client-core-5.6 mysql-server-core-5.6
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  mysql-client-5.6 mysql-server-5.6
0 upgraded, 0 newly installed, 2 to remove and 30 not upgraded.
2 not fully installed or removed.
After this operation, 99.8 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 266816 files and directories currently installed.)
Removing mysql-server-5.6 (5.6.28-0ubuntu0.15.10.1) ...
dpkg: error processing package mysql-client-5.6 (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
Processing triggers for man-db (2.7.4-1) ...
Errors were encountered while processing:
 mysql-client-5.6
E: Sub-process /usr/bin/dpkg returned an error code (1)

e o mesmo para o outro e agora não consigo instalar ou remover nada. O que devo fazer?

    
por Reza.Eghtd 06.04.2016 / 06:52

1 resposta

0

Você tem que parar o serviço mysql. "sudo service stop"

sudo service mysql stop  #or mysqld
sudo killall -9 mysql
sudo killall -9 mysqld
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo deluser mysql
sudo rm -rf /var/lib/mysql
sudo apt-get purge mysql-server-core-5.5
sudo apt-get purge mysql-client-core-5.5
sudo rm -rf /var/log/mysql
sudo rm -rf /etc/mysql
apt-get autoclean
apt-get update
apt-get upgrade
apt-get install -f

você faz o mysql fresco instalar

OR

sudo apt-get remove --purge mysql-server mysql-client mysql-common

apt-get autoclean
apt-get update
apt-get upgrade
apt-get install -f
    
por Maniraj 06.04.2016 / 08:33