PHP 包安装错误

PHP 包安装错误

当我安装 PHP 时出现以下错误:

Package 'php5-gd' has no installation candidate  

附加输出:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5-mysql is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'php5-mysql' has no installation candidate

我该如何解决这个问题?

答案1

解决方案很简单:

sudo apt-get install php-gd php-mysql

16.04 LTS 现在附带 php 7.0,并且包括虚拟包在内的整个包的名称已经更改为php-*php7.0-*而不是php5-*

相关内容