1

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?

Toskan
  • 13,911
  • 14
  • 95
  • 185
  • Can you upgrade to newer Ubuntu version? or it's not an option? – catcon Jul 26 '19 at 04:58
  • does upgrading ubuntu work well? I heard its possible, but it never works well. You are better off deleting the server and creating a new one I guess. – Toskan Jul 26 '19 at 05:00

2 Answers2

1

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

atymic
  • 3,093
  • 1
  • 13
  • 26
0

add-apt-repository is a Python script that allows you to add an APT repository to either /etc/apt/sources.list or to a separate file in the /etc/apt/sources.list.d directory. The command can also be used to remove an already existing repository.

If the add-apt-repository is not available on your system you will get an error message saying

add-apt-repository command not found

The add-apt-repository utility is included in the software-properties-common package. To install it run the following commands:

$ sudo apt update
$ sudo apt install software-properties-common
Joshua
  • 1,128
  • 3
  • 17
  • 31