Não atualiza para “apt-get update” [duplicado]

2

Eu estava tentando atualizar os pacotes PHP no meu servidor Ubuntu 14.04 LTS e continuo recebendo erros. Eu sei que há uma duplicata deste Qn mas eu removi o erro causando arquivo de / var / cache / apt / archives / mas não funcionou.

Eu executei estes comandos:

sudo apt-add-repository ppa:ondrej/php5
sudo apt-get autoremove
sudo apt-get update
sudo apt-get -f install

Então eu peguei isso:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  apache2-mpm-prefork apache2.2-bin apache2.2-common php5-dev php5-gd
The following NEW packages will be installed:
  apache2-bin apache2-data libjson-c2 php5-json php5-ssh2
The following packages have been kept back:
  libgd2-xpm-dev libssl-dev openssl
The following packages will be upgraded:
  apache2 libssh2-php php-pear php5 php5-cli php5-common php5-curl php5-fpm php5-mcrypt php5-mysql
10 upgraded, 5 newly installed, 5 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 375 kB/8007 kB of archives.
After this operation, 2457 kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://ppa.launchpad.net/ondrej/php5/ubuntu/ precise/main php-pear all 5.5.30+dfsg-1+deb.sury.org~precise+1 [373 kB]
Get:2 http://ppa.launchpad.net/ondrej/php5/ubuntu/ precise/main php5 all 5.5.30+dfsg-1+deb.sury.org~precise+1 [1220 B]
Fetched 375 kB in 0s (1074 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 96522 files and directories currently installed.)
Unpacking apache2-bin (from .../apache2-bin_2.4.16-4+deb.sury.org~precise+4_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_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
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por hpb 10.11.2015 / 10:06

1 resposta

1

Primeiro você tem que remover o pacote apache2.2-common

sudo apt-get remove apache2.2-common

e talvez mais, antes que você possa usar o PPA ppa:ondrej/php5 .

Se você vir uma mensagem de erro como esta

trying to overwrite '/usr/share/man/man8/apache2.8.gz', which is also in package apache2.2-common 2.2.22-1ubuntu1.10

remova o pacote que é nomeado entre which is also in package e a versão, por ex. 2.2.22-1ubuntu1.10 .

    
por A.B. 10.11.2015 / 10:11