0

I'm on Ubuntu 14.04 and PHP 7.0. I need to update PHP to PHP 7.4. I added ppa:ondrej/php repository. Still, it says Unable to locate package php7.4 when trying to update PHP.

$ sudo add-apt-repository ppa:ondrej/php
 Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. 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.

Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa

You can get more information about the packages at https://deb.sury.org

IMPORTANT: The <foo>-backports is now required on older Ubuntu releases.

BUGS&FEATURES: This PPA now has a issue tracker:
https://deb.sury.org/#bug-reporting

CAVEATS:
1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
2. If you are using apache2, you are advised to add ppa:ondrej/apache2
3. If you are using nginx, you are advised to add ppa:ondrej/nginx-mainline
   or ppa:ondrej/nginx

PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/

WARNING: add-apt-repository is broken with non-UTF-8 locales, see
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:

# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpayt67sik/secring.gpg' created
gpg: keyring `/tmp/tmpayt67sik/pubring.gpg' created
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpayt67sik/trustdb.gpg: trustdb created
gpg: key E5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
$ sudo apt update
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty InRelease
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates InRelease      
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports InRelease    
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty Release.gpg            
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty Release                
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/main Sources   
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/universe Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/multiverse Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/main Sources 
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/restricted Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/universe Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/main Sources           
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/restricted Sources     
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/universe Sources       
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/multiverse Sources     
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/main amd64 Packages    
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/main Translation-en    
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/restricted Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/universe Translation-en
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty/main Translation-en_US 
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty/universe Translation-en_US
Hit http://ppa.launchpad.net trusty InRelease                                  
Hit http://security.ubuntu.com trusty-security InRelease                       
Hit http://security.ubuntu.com trusty-security/main Sources                    
Hit http://ppa.launchpad.net trusty/main amd64 Packages           
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://ppa.launchpad.net trusty/main Translation-en           
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Reading package lists... Done 
$ sudo apt install php7.4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php7.4
E: Couldn't find any package by regex 'php7.4'

What can be the reason for this issue and how can I install PHP 7.4 on Ubuntu 14.04?

1 Answer 1

2

From the repository description:

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.

Ubuntu 14.04 support ended in April 2019 so the repository doesn't contain packages for 14.04 and you can't install php 7.4. I'm not aware of any other source for new PHP for old Ubuntu releases so you'll probably need to install it manually or upgrade to newer, supported, version of Ubuntu.

1
  • I tried the unsafe ppa:tomvlk/php-archive for Ubuntu trusty 14.04 and PHP 7.4, but no luck
    – Sandra
    Commented Sep 27, 2021 at 14:12

You must log in to answer this question.

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