Search code examples
phpubuntuubuntu-14.04php-7

add-apt-repository ondrej/php for old ubuntu versions (14) and php 7.0


when you run the command

sudo add-apt-repository ppa:ondrej/php

you get:

Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.

both, php 7.0 and ubuntu 14 are dead aka end of life. So ubuntu 14 is dead since april 2019 and php7.0 is dead too for a while now I guess

running:

sudo apt-get install php7.0-gd returns:

Reading package lists... Done Building dependency tree
Reading state information... Done Package php7.0-gd 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 'php7.0-gd' has no installation candidate

so, what now? I have to create a new server with latest ubuntu version to get that php library installed, or is there a different way?

and: just upgrade to php7.1 7.2 or 7.3: no that wont work either as they are not available either under ubuntu 14.

ideas?


Solution

  • Unfortunately you won't be able to use ondrej's repositories on EOL'd ubuntu versions.

    I would strongly consider upgrading if possible, however you can always build the extension from source and install it manually.

    For example, here's an answer for compiling php-gd for php5, but you should be able to adapt it for your version:

    PHP GD bundled extension without recompiling PHP - solution