Ubuntu上官方的源
比如 Ubuntu14.04 默认源中的是 PHP5.6.x、Ubuntu16.04 默认源中的是 PHP7.0.x
通过第三方的源来安装
ppa:ondrej/php 是一个比较知名的PHP源(目前维护php5.6,php7.0,php7.1,php7.2,php7.3)。下面就用这个源来安装自己想要的PHP版本。
安装步骤
使用ppa增加源
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
1
2
查看源中PHP7.2版本
sudo apt list | grep php
不出意外,列表中已经包含你想要的PHP版本了
安装PHP7.2
sudo apt-get -y install php7.2
————————————————
版权声明:本文为CSDN博主「dadeity」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/github_38336924/article/details/83748533
来源: https://blog.csdn.net/github_38336924/article/details/83748533