![无法在 Ubuntu 16.04.3 LTS 上安装 php5.6-gd](https://linux22.com/image/929160/%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%2016.04.3%20LTS%20%E4%B8%8A%E5%AE%89%E8%A3%85%20php5.6-gd%20.png)
我尝试在 Ubuntu 16.04.3 LTS 上安装 PHP GD。看起来我缺少一些依赖项:
root@Ubuntu-1604-xenial-64-minimal /etc/php/5.6/apache2 # apt-get install php5.6-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-headers-4.15.0-60-generic : Depends: linux-headers-4.15.0-60 but it is not going to be installed
php5.6-gd : Depends: php-common (>= 1:73) but 1:55+ubuntu16.04.1+deb.sury.org+1 is to be installed
Depends: php5.6-common (= 5.6.40-30+ubuntu16.04.1+deb.sury.org+1) but 5.6.32-1+ubuntu16.04.1+deb.sury.org+1 is to be installed
Depends: libgd3 (>= 2.1.1) but it is not going to be installed
Depends: libxpm4 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
这些是我已经拥有的包裹:
root@Ubuntu-1604-xenial-64-minimal /etc/php/5.6/apache2 # dpkg --get-selections | grep php
libapache2-mod-php5.6 install
php-common install
php5.6 install
php5.6-cli install
php5.6-common install
php5.6-json install
php5.6-mbstring install
php5.6-mcrypt install
php5.6-mysql install
php5.6-opcache install
php5.6-readline install
php5.6-xml install
答案1
apt-get -f install
修复了它(捂脸)