Ubuntu 16.04 升级 PHP 版本至 7.1

  1. 云栖社区>
  2. 博客>
  3. 正文

Ubuntu 16.04 升级 PHP 版本至 7.1

Tinywan. 2017-12-19 11:28:00 浏览1762
展开阅读全文

安装swoole扩展,怎么安装到7.0下去了,我本来编译的版本是7.19版本,但是没吃

 升级步骤

$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get upgrade php

直接安装提示这个:

www@TinywanAliYun:~$ pecl install swoole
The program 'pecl' is currently not installed. To run 'pecl' please ask your administrator to install the package 'php-pear'

 

sudo apt-get install php-pear

 

 错误提示:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/xml.so' - /usr/lib/php/20160303/xml.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/dom.so' - /usr/lib/php/20160303/dom.so: cannot open shared object file: No such file or directory in Unknown on line 0

 

 

开始了

1、软连接

sudo ln -s /usr/local/php-7.1.8/bin/php /usr/bin/php

2、php7.1-dev

sudo apt search php7

sudo
apt-get install php7.1-dev

 

 





网友评论

登录后评论
0/500
评论
Tinywan.
+ 关注