Re: Erro de instalação

0

Por que recebo

E: Sub-process /usr/bin/dpkg returned an error code (1) 

quando digito apt-get install -f e como posso resolver?

root@john-PC:~# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  mysql-server-5.6
Suggested packages:
  mailx tinyca
The following NEW packages will be installed:
  mysql-server-5.6
0 upgraded, 1 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
Need to get 0 B/5,766 kB of archives.
After this operation, 51.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 230930 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.6_5.6.28-0ubuntu0.15.04.1_i386.deb ...
Aborting downgrade from (at least) 10.0 to 5.6.
If are sure you want to downgrade to 5.6, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.6_5.6.28-0ubuntu0.15.04.1_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.6_5.6.28-0ubuntu0.15.04.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por John N. Murage 09.03.2017 / 10:23

1 resposta

0

Isso ocorre porque o mysql já está instalado.
Solução para isso está abaixo, siga em ordem de seqüência, um deles irá corrigir erro:
1. apt-get autoremove
2. dpkg --configure -a
ou
1. tente limpar o servidor mysql.
2. limpe o cache:

sudo rm /var/cache/apt/archives/mysql-server*    
sudo apt-get update && apt-get install >package< 
    
por anand 09.03.2017 / 10:53