错误信息如下:
g++ -I. -I/private/tmp/pear/temp/swoole -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-wangdongzhaoqz42R8/swoole-4.4.13/include -I/private/tmp/pear/temp/pear-build-wangdongzhaoqz42R8/swoole-4.4.13/main -I/private/tmp/pear/temp/swoole -I/usr/local/Cellar/[email protected]/7.2.26/include/php -I/usr/local/Cellar/[email protected]/7.2.26/include/php/main -I/usr/local/Cellar/[email protected]/7.2.26/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.2.26/include/php/Zend -I/usr/local/Cellar/[email protected]/7.2.26/include/php/ext -I/usr/local/Cellar/[email protected]/7.2.26/include/php/ext/date/lib -I/private/tmp/pear/temp/swoole -I/private/tmp/pear/temp/swoole/include -I/private/tmp/pear/temp/swoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /private/tmp/pear/temp/swoole/php_swoole_cxx.cc -fno-common -DPIC -o .libs/php_swoole_cxx.o
In file included from /private/tmp/pear/temp/swoole/php_swoole_cxx.cc:1:
In file included from /private/tmp/pear/temp/swoole/php_swoole_cxx.h:19:
In file included from /private/tmp/pear/temp/swoole/php_swoole.h:53:
/private/tmp/pear/temp/swoole/include/swoole.h:620:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
^~~~~~~~~~~~~~~
1 error generated.
make: *** [php_swoole_cxx.lo] Error 1
ERROR: `make' failed
没有加 openssl 库的路径或者指定 openssl 库的路径不对,缺少头文件。
没有 openssl 的话使用 brew 安装一个 openssl,在 pecl 安装的时候加上对应路径即可
enable openssl support? [no] : yes --with-openssl-dir=/usr/local/opt/[email protected]
Most helpful comment
没有加 openssl 库的路径或者指定 openssl 库的路径不对,缺少头文件。
没有 openssl 的话使用 brew 安装一个 openssl,在 pecl 安装的时候加上对应路径即可