PHP-APC 错误请帮忙

PHP-APC 错误请帮忙

我正在尝试安装php-apc插件但出现错误。

sudo apt-get install php-pear php5-dev libpcre3-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  php5-json

E: Package 'php5-dev' has no installation candidate

sudo pecl install apc

downloading APC-3.1.13.tgz ...
Starting to download APC-3.1.13.tgz (171,591 bytes)
.....................................done: 171,591 bytes
55 source files, building
running: phpize
sh: 1: phpize: not found
ERROR: `phpize' failed

想知道这是什么原因造成的吗?我尝试在 Google 上搜索 phpize 错误和其他相关内容,但都无济于事。

PHP信息:http://wolfgaming.eu/web/phpcheck.php

答案1

要解决您的问题,您需要安装软件包,php7.0因此您的安装命令将是:

sudo apt-get install php-pear php-dev php-json libpcre3-dev php-apcu

答案2

您可以通过安装这个纯 php apcu 兼容性文件来修复此问题:

https://github.com/SegFaulty/php-apcu-bc

这将使用 apc_* 函数模拟 apcu_* 函数(反之亦然)

相关内容