Execute os seguintes comandos:
mkdir MYSQL
cd MYSQL
sudo apt-get download mysql-common
ar xvf mysql*
tar xvf dat*
sudo cp ./etc/mysql/my.cnf.fallback /etc/mysql/my.cnf.fallback
sudo dpkg -i mysql*deb
cd
sudo apt-get -f install
Eu atualizei o sistema alguns dias atrás e depois disso tive um problema de pacotes quebrados que afeta o MySQL e várias bibliotecas. Depois disso, posso fazer atualizações, mas não instalo, atualizo, removo ou purga pacotes, e não encontro nenhuma maneira de resolver o problema de dependências quebradas.
Eu não tenho certeza se o problema das dependências quebradas e do MySQL estão diretamente relacionados ou não, então tentarei descrever os dois separadamente.
Primeiro, se eu tentar instalar um pacote ou fazer uma atualização, recebo a seguinte mensagem:
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libsasl2-modules:i386 : Depends: libssl1.0.0:i386 (>= 1.0.0) but it is not installed
skype-bin:i386 : Depends: libssl1.0.0:i386 but it is not installed
E: Unmet dependencies. Try using -f.
Se eu usar a opção -f de atualização, obtenho
$ sudo apt-get -f upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following NEW packages will be installed:
libssl1.0.0:i386
The following packages will be upgraded:
snapd
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/5,235 kB of archives.
After this operation, 6,545 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Setting up mysql-common (5.7.12-0ubuntu1.1) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Olhando com o Synaptic, vejo os seguintes pacotes quebrados
libsasl2-modules;i386
skype-bin:i386
Aqui, se eu tentar remover, reinstalar ou qualquer coisa que eu receba com o Synaptic, sempre a mesma mensagem de erro
E: mysql-common: subprocess installed post-installation script returned error exit status 2
Se eu tentar configurar o MySQL (o que é instalado teoricamente na versão mais recente), então recebo esta mensagem:
$ sudo dpkg --configure -a
Setting up mysql-common (5.7.12-0ubuntu1.1) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of mysql-server-5.7:
mysql-server-5.7 depends on mysql-common (>= 5.6.22-1~); however:
Package mysql-common is not configured yet.
mysql-server-5.7 depends on mysql-common (>= 5.5); however:
Package mysql-common is not configured yet.
dpkg: error processing package mysql-server-5.7 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-common
mysql-server-5.7
mysql-server
Na atualização do MySQL, algo foi realmente estranho.
Por exemplo, procurando pelos arquivos my.cnf
, my.cnf.fallback
etc ... eu percebi que os arquivos e suas pastas não existem mais. Eu ignoro como eles desaparecem durante a atualização. p>
Tentando reinstalar o MySQL sem qualquer esperança, recebi esta mensagem:
$ sudo apt-get -f install mysql-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-common is already the newest version (5.7.12-0ubuntu1.1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libsasl2-modules:i386 : Depends: libssl1.0.0:i386 (>= 1.0.0) but it is not going to be installed
skype-bin:i386 : Depends: libssl1.0.0:i386 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Se eu usar a remoção para desinstalá-los e começar do zero, terei os mesmos problemas
$ sudo apt-get purge mysql-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libmysqlclient18 : Depends: mysql-common (>= 5.5) but it is not going to be installed
libmysqlclient18:i386 : Depends: mysql-common:i386 (>= 5.5)
libmysqlclient20 : Depends: mysql-common (>= 5.5) but it is not going to be installed
libsasl2-modules:i386 : Depends: libssl1.0.0:i386 (>= 1.0.0) but it is not going to be installed
mysql-client-5.7 : Depends: mysql-common (>= 5.5) but it is not going to be installed
mysql-server-5.7 : PreDepends: mysql-common (>= 5.5) but it is not going to be installed
Depends: mysql-common (>= 5.6.22-1~) but it is not going to be installed
skype-bin:i386 : Depends: libssl1.0.0:i386 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Se eu tentar apt-get -f install
, obtenho
$ sudo apt-get -f install
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libssl1.0.0:i386
The following NEW packages will be installed:
libssl1.0.0:i386
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
3 not fully installed or removed.
Need to get 0 B/949 kB of archives.
After this operation, 3,207 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Setting up mysql-common (5.7.12-0ubuntu1.1) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Alguém tem uma ideia, o que eu posso fazer?
Execute os seguintes comandos:
mkdir MYSQL
cd MYSQL
sudo apt-get download mysql-common
ar xvf mysql*
tar xvf dat*
sudo cp ./etc/mysql/my.cnf.fallback /etc/mysql/my.cnf.fallback
sudo dpkg -i mysql*deb
cd
sudo apt-get -f install