我一直在尝试使用imagick模块设置运行
PHP 5.4的Ubuntu 12.04 VM.我在google上找到的所有结果都说使用
ondrej packages,这在很大程度上完美无缺.所有主要模块都按照应有的方式安装和运行,但是当我尝试安装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.
我终于通过从ondrej repo手动下载软件包并使用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
更新:找不到包404,这是正确的地址:https://launchpad.net/~ondrej/+archive/ubuntu/php5-oldstable/+files/php5-imagick_3.1.0%7Erc2-1%7Eprecise%2B1_amd64.deb