无法在 Ubuntu 16.04.3 LTS 上安装 php5.6-gd

无法在 Ubuntu 16.04.3 LTS 上安装 php5.6-gd

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

修复了它(捂脸)

相关内容