当试图安装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。
你有一个冲突的包,你需要先删除php-apc ,然后用第三方包replace它。
重来:
apt-get remove php-apc php5-apc
然后再试一次:
apt-get install php5-apc
其实是:
apt-get install php-apc