当我尝试将 php 从 5.3 升级到 5.6 时,出现了这个错误
Extracting templates from packages: 100%
(Reading database ... 98172 files and directories currently installed.)
Unpacking apache2-bin (from .../apache2-bin_2.4.20-1+deb.sury.org~precise+3_amd64.deb) ...
**dpkg: error processing /var/cache/apt/archives/apache2-bin_2.4.20-1+deb.sury.org~precise+3_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/apache2', which is also in package apache2-mpm-prefork 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
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.20-1+deb.sury.org~precise+3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
有人可以帮帮我吗?
答案1
我猜你正在使用适用于 PHP 5.6 的 PPA适用于 Ubuntu 12.04 (精确)。
您的问题是因为该功能apache2-mpm-prefork
在 2.4.x 中已过时。您只需删除apache2-mpm-prefork
,然后安装apache2
,默认为 prefork 模式。