Skip to content
Advertisement

How can I install php7.4 on Ubuntu 19.04?

After adding the ppa ondrej/php, I try sudo apt-get install php7.4, but the output is

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 glob 'php7.4'
E: Couldn't find any package by regex 'php7.4'

I have checked and there is a package that should install with that command, but I must be doing something wrong?

Advertisement

Answer

have you tried updating your rep?

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.4
php -v

I didn’t pay enough attention, this package doesn’t exist yet for ubuntu 19.04:

php7.4  7.4.2-6+ubuntu19.10.1+deb.sury.org+1    Ondrej Surý (2020-02-05)
php7.4  7.4.2-6+ubuntu18.04.1+deb.sury.org+1    Ondrej Surý (2020-02-05)
php7.4  7.4.2-6+ubuntu16.04.1+deb.sury.org+1    Ondrej Surý (2020-02-05)
6 People found this is helpful
Advertisement