2

When I install PHP this error occurs:

Package 'php5-gd' has no installation candidate  

Additional output:

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

How can I fix this problem?

1
  • 16.04 does not have PHP 5, only PHP 7.
    – fkraiem
    May 15, 2016 at 10:13

1 Answer 1

3

The solution is easy:

sudo apt-get install php-gd php-mysql

16.04 LTS comes now with php 7.0 and the names of the whole packages including the virtual packages have changed to be now php-* or php7.0-* instead of php5-*.

1
  • 1
    This showed up in LQ review. You should probably mention that php5-* package are now mostly known as php-* and they;re for PHP 7.
    – muru
    May 15, 2016 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .