sudo su -
echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" | tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" | tee -a /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C
apt-get update
exit
在系统中添加整个镜像源是危险的,很可能会更新掉系统文件,破坏系统的稳定性,所以这里只添加php的源
网友评论