安裝swoole報(bào)錯(cuò),錯(cuò)誤信息如下:
/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
報(bào)錯(cuò)原因
報(bào)錯(cuò)很明顯,找不到 openssl/ssl.h ,首先要確認(rèn)電腦上有沒(méi)有安裝 openssl
Mac安裝openssl
brew install openssl
既然它找不到,那么就需要手動(dòng)的指定 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
推薦學(xué)習(xí): swoole視頻教程