php5-mcrypt 安装错误

php5-mcrypt 安装错误

运行 Ubuntu 9.10 并尝试安装 php5-mcrypt 模块时,它却让我崩溃。我不知道还能尝试什么。有人知道吗?

这是我收到的错误:

sudo apt-get install 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: libltdl3 (>= 1.5.2-2) but it is not installable
               Depends: php5 but it is not going to be installed or
                        phpapi-20090626+lfs
E: Broken packages

来源列表如下:

## main & restricted repositories
deb http://us.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic main restricted

deb http://security.ubuntu.com/ubuntu karmic-security main restricted
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted

## universe repositories
deb http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe

deb http://security.ubuntu.com/ubuntu karmic-security universe
deb-src http://security.ubuntu.com/ubuntu karmic-security universe

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all

答案1

我在 Ubuntu 9.10 服务器中遇到了同样的问题(我也使用 php53 dotdeb 存储库)。
我解决了在 /etc/apt/sources.list 中添加此行的问题

deb http://security.debian.org/debian-security lenny/updates main

然后你应该执行:

gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B

sudo apt-key add .gnupg/pubring.gpg

sudo aptitude update

sudo aptitude install libltdl3

现在重新启动 Apache 后......

sudo service apache2 restart

... 启用 mcrypt 扩展后,PHP 5.3 将可以正常工作。

答案2

我认为您使用的源存在某种冲突。从您的错误来看,您需要卸载当前拥有的 libltdl 版本并安装此版本:

http://packages.ubuntu.com/ro/karmic/libtool

它还抱怨 php5 - 您是否已经通过 deb 安装了 php5?

您的附加存储库可能会导致版本冲突:

http://www.dotdeb.org/

我认为标准的 Ubuntu 存储库包括 php5 和 php5-mcrypt,因此除非您使用的版本比内置 Ubuntu 存储库更新,否则您不需要任何其他存储库。当然,这些都是猜测,它高度依赖于系统,我不知道您在系统上安装了什么。希望这对您有所帮助!:)

答案3

您可以从 debian 手动安装 libltdl3 包: http://packages.debian.org/lenny/i386/libltdl3/download

相关内容