日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

php安装event扩展的问题

發(fā)布時間:2023/12/15 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php安装event扩展的问题 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

為什么80%的碼農(nóng)都做不了架構師?>>> ??

event是libevent的OOP封裝,比libevent擴展提供了更完善的OOP結構和大量的內(nèi)置可重用組件,libevent不支持php 7及后續(xù)版本,已經(jīng)逐步被pecl舍棄,其最新版本只維護到2013年且長期處于beta狀態(tài)。

所以,建議優(yōu)先使用event而不是libevent擴展。 廣義上的libevent是指libevent這個事件庫,但PHP中的一個擴展也稱為libevent, 實際使用時要注意加以區(qū)分。

event擴展依賴libevent2庫,安裝event時可能遇到以下錯誤: checking for include/event2/event.h... not found configure: error: Please reinstall the event library, or provide the installation prefix via --with-event-libevent-dir option ERROR: `/tmp/pear/temp/event/configure --with-php-config=/usr/local/php/bin/php-config --enable-event-debug=no --enable-event-sockets=yes --with-event-libevent-dir=/usr --with-event-pthreads=no --with-event-extra --with-event-openssl --with-openssl-dir=no' failed 提示沒有安裝libevent2軟件包:

嘗試安裝: yum install libevent2 提示:Error: libevent2-devel conflicts with libevent-devel-1.4.13-4.el6.x86_64 與舊版本沖突,卸載舊版本: yum remove libevent

然后再安裝libevent軟件包,成功 最后安裝event組件:

pecl install event 成功。

注意:一些php安裝中可能沒有pecl命令,這個命令集成在pear包中,編譯php時需要啟用pear包: 不要在confiure參數(shù)中添加:--without-pear

轉載于:https://my.oschina.net/zxu/blog/1575574

總結

以上是生活随笔為你收集整理的php安装event扩展的问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。