简体   繁体   English

无法在 ubuntu 20 上安装 php 7.3

[英]unable to install php 7.3 on ubuntu 20

hi i want to install php 7.3 on ubuntu 20 for my nginx web server, when i try to install the 7.4 version every thing is fine but for 7.3 i get this error hi i want to install php 7.3 on ubuntu 20 for my nginx web server, when i try to install the 7.4 version every thing is fine but for 7.3 i get this error

E: Unable to locate package php7.3

then i run the commands below:然后我运行以下命令:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3

but again it shows that it cant locate the package.但它再次显示它无法找到 package。 does ubuntu 20 supports php 7.3 or below and if yes what can be wrong with mine?? ubuntu 20 是否支持 php 7.3或更低版本,如果是,我的可能有什么问题?

Solution解决方案

Add Ondrej PPA repository to your system.将 Ondrej PPA 存储库添加到您的系统。

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

Install php7.3 and check it's installed.安装 php7.3 并检查它是否已安装。

sudo apt install -y php7.3
php -v

This also works for php 7.4, php7.2 and php5.6.这也适用于 php 7.4、php7.2 和 php5.6。 Just change the relevant digits.只需更改相关数字即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM