在centos7通过yum安装PHP7报错
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
提示错误:
error: Failed dependencies:
epel-release >= 7 is needed by webtatic-release-7-3.noarch
安装依赖
yum -y install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装报错,
yum -y install php72*
Error: php72w-mysql conflicts with php72w-mysqlnd-7.2.34-1.w7.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
跳过
yum -y install php72* --skip-broken
php -v
yum -y install unzip pcre-devel autoconf make gcc
cd /usr/local/src
wget https://gitee.com/swoole/swoole/repository/archive/v2.2.0.zip
unzip v2.2.0.zip
cd swoole
phpize
./configure
make && make install
最后一行添加
vim /etc/php.ini
extension=swoole.so
查看
php -m|grep swoole
php -i | grep swoole
[root@iZwz959tpwttz6z9xmq877Z ~]# php -i | grep swoole
swoole
swoole support => enabled
swoole.aio_thread_num => 2 => 2
swoole.display_errors => On => On
swoole.fast_serialize => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608
swoole.use_namespace => On => On
swoole.use_shortname => On => On