按照文档中的方法,执行#yum install libevent2-devel -yLoaded plugins: fastestmirror, replace
Loading mirror speeds from cached hostfile
base: mirrors.aliyun.com
epel: mirrors.aliyun.com
extras: mirrors.aliyun.com
updates: mirrors.aliyun.com
No package libevent2-devel available.
Error: Nothing to do
而执行:
yum install libevent-devel -y倒是没有报错:
Loaded plugins: fastestmirror, replace
Loading mirror speeds from cached hostfile
base: mirrors.aliyun.com
epel: mirrors.aliyun.com
extras: mirrors.aliyun.com
updates: mirrors.aliyun.com
Package libevent-devel-2.0.21-4.el7.x86_64 already installed and latest version
Nothing to do
由于现在使用的是PHP7.1故请问如何安装event扩展依赖的libevent-devel包
Package libevent-devel-2.0.21-4.el7.x86_64 already installed and latest version
Nothing to do
意思是已经安装了最新版本,已经安装过了
好的,谢谢
可以手动编译安装
下载
wget https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
解压
tar zxvf libevent-2.1.11-stable.tar.gz
cd libevent-2.1.11-stable
./configure --prefix=/usr/local/libevent-2.1.11-stable
make && make install
下载
wget https://pecl.php.net/get/event-2.5.3.tgz
解压
tar zxvf event-2.5.3.tgz
cd event-2.5.3
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-event-libevent-dir=/usr/local/libevent-2.1.11-stable
make && make install
extension=event.so
追问一下:如何测试event扩展被调用了,而不再使用框架里的Select.php呢?