1

我有一个运行 PHP 5.5 的 ubuntu 服务器

$ php -v
PHP 5.5.3-1ubuntu2 (cli) (built: Oct  9 2013 14:49:12) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

我现在正在尝试安装php5-mcrypt,但我收到以下错误消息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php5-mcrypt : Depends: phpapi-20090626
E: Unable to correct problems, you have held broken packages.

我明白,不知何故 mcrypt 包与我当前的 PHP 版本不兼容,但我该如何解决这个问题?

谢谢!

4

1 回答 1

0

确保您的存储库是最新的:

sudo apt-get update

您可能持有包裹。您可以通过以下方式获取实际持有的包裹列表:

dpkg --get-selections | grep hold

然后您可以删除任何看起来不正确的内容:

apt-get remove "package_name"

顺便说一句 - 这看起来像一个 php 5.3 包。

于 2015-04-08T01:03:57.740 回答