Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Ubuntu 19.04上安装php7.4?_Php_Linux_Ubuntu - Fatal编程技术网

如何在Ubuntu 19.04上安装php7.4?

如何在Ubuntu 19.04上安装php7.4?,php,linux,ubuntu,Php,Linux,Ubuntu,在添加ppaondrej/php之后,我尝试sudo-apt-get-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 glob 'php7.4' E: Couldn't find a

在添加ppa
ondrej/php
之后,我尝试
sudo-apt-get-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 glob 'php7.4'
E: Couldn't find any package by regex 'php7.4'

我已经检查过了,有一个软件包应该使用该命令安装,但我一定是做错了什么?

您是否尝试过更新您的代表

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.4
php -v
我没有引起足够的注意,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)

添加回购协议后,您是否运行了apt get update?这个软件包的名字对我来说很合适。是的,我试过了,我也试过升级,但没有改变任何东西。同样的问题,无法安装php7.4。我试过了,但不幸的是,它仍然给了我同样的错误。更新后,我以前错过了你标题中的ubuntu 19.04部分。我注意到,我想我必须改变我的ubuntu版本,因为它不再受支持了。谢谢!