刚刚订购了一台新的 Debian 服务器,但由于某种原因无法安装 php5-suhosin 和 php5-apc。有什么想法吗?
apt-get install php5-suhosin
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-suhosin 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
E: Package 'php5-suhosin' has no installation candidate
=========================================
apt-get install php5-apc
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-apc
php -v
PHP 5.4.4-14+deb7u4 (cli) (built: Aug 23 2013 14:37:41)
答案1
APC 和 suhosin 在稳定的存储库中不可用。
你可以从 dotdeb repo 安装它,方法是将以下内容添加到你的 sources.list
deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all
deb http://packages.dotdeb.org squeeze-php54 all
deb-src http://packages.dotdeb.org squeeze-php54 all
另外,你可以通过 PECL 安装适用于 php <5.5 的 apc:
apt-get install php5-dev gcc make
pecl install apc
答案2
Suhosin 尚未添加到 Wheezy 的存储库(参见:http://lists.debian.org/debian-user/2013/04/msg00409.html),但 APC 是存在的,只是被称为php-apc
。(参见:http://packages.debian.org/wheezy/php-apc)
答案3
Suhosin 有自己的存储库,肯定是最新的。即使您有提供该软件包的 Debian 版本,首选安装方式也是将其添加到 /apt/sources.list.d 中。