2015-10-09 62 views
4

我在更新我的php版本時出現此錯誤。dpkg:錯誤處理/var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb

PHP 5.3.10 
OS Ubuntu 12.04.1 LTS 

運行命令sudo apt-get install php5同時,得到以下錯誤:

Unpacking apache2-bin (from .../apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb) ... 
dpkg: error processing /var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb (--unpack): 
trying to overwrite '/usr/share/man/man8/apache2.8.gz', which is also in package apache2.2-common 2.2.22-1ubuntu1 
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_i386.deb 
E: Sub-process /usr/bin/dpkg returned an error code (1) 

我曾嘗試下面的命令,但問題依然存在。

sudo apt-get clean 
sudo dpkg --configure -a 
sudo apt-get install -f 

請提出這個方案,由於

回答

0

我有同樣的問題時,升級PHP,你可以試試這個

sudo dpkg -i --force-overwrite /var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb

然後

sudo apt-get -f install php5

此安裝PHP5將升級apache2,享受它。