我一直在试图设置一个运行PHP 5.4的imagick模块的Ubuntu 12.04虚拟机。 我在谷歌find的所有结果都说使用ondrej包 ,这在大多数情况下完美地工作。 所有的主要模块安装和运行正是他们应该的方式,但是当我尝试安装imagick它告诉我我错过了依赖。
# apt-get install php5-imagick 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-imagick : Depends: phpapi-20090626 E: Unable to correct problems, you have held broken packages.
phpapi-20090626似乎是应该与php5一起安装的东西。
这是包中的错误吗? 我能做些什么来解决这个问题?
我终于通过从ondrej仓库手动下载软件包并使用dpkg安装它,最终解决了这个问题:
$ wget https://launchpad.net/~ondrej/+archive/php5/+files/php5-imagick_3.1.0%7Erc1-1%7Eprecise%2B1_amd64.deb $ dpkg -i php5-imagick_3.1.0~rc1-1~precise+1_amd64.deb
更新:包未find404,这是正确的地址: https : //launchpad.net/~ondrej/+archive/ubuntu/php5-oldstable/+files/php5-imagick_3.1.0%7Erc2-1%7Eprecise%2B1_amd64.deb
对于那些坚持与i386拱这个问题的人这里是链接到最新的包为i386:
$ wget https://launchpad.net/~ondrej/+archive/php5/+files/php5-imagick_3.1.0%7Erc2-1%7Eprecise%2B1_i386.deb $ dpkg -i php5-imagick_3.1.0~rc2-1~precise+1_i386.deb
地址将被重新更改,所以只需转到https://launchpad.net并search“ondrej php5-imagick 64 presize”