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 

我在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 

… PHP 5.3将正常工作,启用mcrypt扩展。

我在想你所使用的来源有一些冲突。 从你的错误,它看起来像你需要卸载你当前有libltdl的版本,并安装这一个:

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

它也抱怨php5 – 你有php5已经通过deb安装?

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

 http://www.dotdeb.org/ 

我认为标准的Ubuntu存储库包括php5和php5-mcrypt,所以除非你使用的版本比使用内置的Ubuntu版本更新,否则你不需要任何额外的版本库。 当然,这些都是猜测,这是高度依赖系统,我不知道你已经安装在系统上。 希望能帮助你一点点! 🙂

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