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,並且包括虛擬包在內的整個包的名稱已更改為 nowphp-*php7.0-*代替php5-*.

相關內容