安裝swoole報錯,錯誤信息如下:
/Users/luzhuang/Downloads/swoole-src-4.4.3/include/swoole.h:596:10: fatal error: 'openssl/ssl.h' file not found #include <openssl/ssl.h> ^~~~~~~~~~~~~~~ 1 error generated. make: *** [php_swoole_cxx.lo] Error 1
報錯原因
報錯很明顯,找不到 openssl/ssl.h ,首先要確認電腦上有沒有安裝 openssl
Mac安裝openssl
brew install openssl
既然它找不到,那么就需要手動的指定 openssl 的目錄:
./configure --enable-coroutine --enable-openssl --enable-http2 --enable-async-redis --enable-sockets --enable-mysqlnd --with-openssl-dir=/usr/local/Cellar/openssl/1.0.2s --with-php-config=/Applications/MAMP/bin/php/php7.2.14/bin/php-config
推薦學習:?swoole視頻教程
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦