Erro de atualização do Ubuntu apt-get no Ubuntu 12.04

2

Estou tentando usar o comando sudo apt-get upgrade no mu ubuntu 12.04. Mas é está me mostrando o erro. Isso é depois de eu atualizei meu php 5.4 para php5.5 .

You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: libapache2-mod-php5 : Depends: apache2-api-20120211 Depends: apache2 (>= 2.4) E: Unmet dependencies. Try using -f.

então eu corri o comando

sudo apt-get install -f

para corrigir o problema de dependência e também está me dando o erro

 Unpacking apache2-bin (from
 .../apache2-bin_2.4.16-3+deb.sury.org~precise+1_amd64.deb) ... dpkg:
 error processing
 /var/cache/apt/archives/apache2-bin_2.4.16-3+deb.sury.org~precise+1_amd64.deb
 (--unpack):  trying to overwrite '/usr/share/man/man8/apache2.8.gz',
 which is also in package apache2.2-common 2.2.22-1ubuntu1.10 dpkg-deb
 (subprocess): subprocess data was killed by signal (Broken pipe)
 dpkg-deb: error: subprocess <decompress> returned error exit status 2
 Unpacking apache2-data (from
 .../apache2-data_2.4.16-3+deb.sury.org~precise+1_all.deb) ... dpkg:
 error processing
 /var/cache/apt/archives/apache2-data_2.4.16-3+deb.sury.org~precise+1_all.deb
 (--unpack):  trying to overwrite '/usr/share/apache2/icons/a.png',
 which is also in package apache2.2-common 2.2.22-1ubuntu1.10 dpkg-deb
 (subprocess): subprocess data was killed by signal (Broken pipe)
 dpkg-deb: error: subprocess <decompress> returned error exit status 2
 Preparing to replace apache2 2.2.22-1ubuntu1.10 (using
 .../apache2_2.4.16-3+deb.sury.org~precise+1_amd64.deb) ... Unpacking
 replacement apache2 ... dpkg: error processing
 /var/cache/apt/archives/apache2_2.4.16-3+deb.sury.org~precise+1_amd64.deb
 (--unpack):  trying to overwrite
 '/usr/share/apache2/ask-for-passphrase', which is also in package
 apache2.2-common 2.2.22-1ubuntu1.10 dpkg-deb (subprocess): subprocess
 data was killed by signal (Broken pipe) dpkg-deb: error: subprocess
 <decompress> returned error exit status 2 Processing triggers for
 man-db ... Errors were encountered while processing: 
 /var/cache/apt/archives/apache2-bin_2.4.16-3+deb.sury.org~precise+1_amd64.deb
 /var/cache/apt/archives/apache2-data_2.4.16-3+deb.sury.org~precise+1_all.deb
 /var/cache/apt/archives/apache2_2.4.16-3+deb.sury.org~precise+1_amd64.deb
 E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por Manoj Kumar 28.08.2015 / 09:52

2 respostas

7

Eu tive o mesmo problema. Funcionou executando o seguinte:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/apache2-bin_2.4.16-3+deb.sury.org~precise+1_amd64.deb
sudo dpkg -i --force-overwrite /var/cache/apt/archives/apache2-data_2.4.16-3+deb.sury.org~precise+1_all.deb
sudo dpkg -i --force-overwrite /var/cache/apt/archives/apache2_2.4.16-3+deb.sury.org~precise+1_amd64.deb

Depois disso, o sudo "apt-get -f install" funcionou bem!

    
por user3703155 30.08.2015 / 11:17
1

Adicionar repositório com

add-apt-repository ppa:ondrej/php5
apt-get update

Remova todas as versões anteriores do php. Em seguida, instale recentemente uma versão de sua preferência. Em seguida, adicione os módulos php-cgi para cgi e fcgi.

Agora você poderá usar scripts FCGI e CGI. mod_apache será um problema, mas você poderá usar isso. Certifique-se de reiniciar o apache depois de instalar o php-cgi

    
por Thathwamasi 12.08.2016 / 03:30