无法安装 PHP5-APC

无法安装 PHP5-APC

尝试安装 php5-apc 时出现此错误:

root@x-fr-1:/etc/apt# apt-get install php5-apc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  php5-apc
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 70.4 kB of archives.
After this operation, 211 kB of additional disk space will be used.
Get:1 http://packages.dotdeb.org/ stable/all php5-apc amd64 5.4.23-1~dotdeb.1 [70.4 kB]
Fetched 70.4 kB in 0s (726 kB/s)
(Reading database ... 48129 files and directories currently installed.)
Unpacking php5-apc (from .../php5-apc_5.4.23-1~dotdeb.1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/php5-apc_5.4.23-1~dotdeb.1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/php5/20100525/apc.so', which is also in package php-apc 3.1.13-1
Processing triggers for php5-fpm ...
[ ok ] Restarting PHP5 FastCGI Process Manager: php5-fpm.
Errors were encountered while processing:
 /var/cache/apt/archives/php5-apc_5.4.23-1~dotdeb.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我正在运行 Debian 7 Wheezy 和 PHP5-FPM。

答案1

您有一个冲突的包,php-apc您需要先将其删除,然后再用第三方包替换它。

重来:

apt-get remove php-apc php5-apc

然后重试:

apt-get install php5-apc

答案2

实际上是:

apt-get install php-apc

相关内容