Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install php7.4 on Ubuntu 19.04?

Tags:

linux

php

ubuntu

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?

like image 576
dasem314 Avatar asked Apr 29 '20 18:04

dasem314


1 Answers

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)
like image 129
Ali Adiby Avatar answered Oct 25 '22 19:10

Ali Adiby