我无法将 imagick 或 gd 扩展安装到我的 ubuntu 14.04。尝试了很多方法都没有解决。
sudo apt-get install imagemagick libmagickwand-dev
以下是命令输出:
root@mail:~# sudo apt-get install imagemagick libmagickwand-dev Reading package lists... Done Building dependency tree Reading state information... Done imagemagick is already the newest version. 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: libmagickwand-dev : Depends: libmagickcore-dev (= 8:6.7.7.10-6ubuntu3.13) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
答案1
似乎您有依赖关系问题,请尝试修复它们:
sudo apt-get install -f
从man apt-get
:
-f, --fix-broken 修复;尝试纠正存在损坏依赖关系的系统。此选项与 install/remove 一起使用时,可以忽略任何软件包,以允许 APT 推断出可能的解决方案。如果指定了软件包,则这些软件包必须完全解决问题。第一次运行 APT 时,此选项有时是必要的;APT 本身不允许损坏的软件包依赖关系存在于系统中。系统的依赖结构可能已损坏,需要手动干预(这通常意味着使用 dpkg --remove 来消除一些有问题的软件包)。在某些情况下,将此选项与 -m 一起使用可能会产生错误。配置项:APT::Get::Fix-Broken。