php扩展swoole编译安装openssl报错,github.com/swoole,php扩展swoole编译安装openssl报错,error: openssl/ssl.h: No such file or directory,make: *** [Makefile:192: php_swoole_cxx.lo] Error 1
基系统 windows10
虚拟机 docker
虚拟机 系统debain
version: '1.0'
services:
php-seven-four:
image: php:7.4-fpm
ports:
- "9000:9000"
volumes:
- "./html:/usr/share/nginx/html"
networks:
- app_net
networks:
app_net:
driver: bridge
make: * [Makefile:192: php_swoole_cxx.lo] Error 1
root@php-seven-four:/swoole-src-4.4.26# php -v
PHP 7.4.33 (cli) (built: Nov 15 2022 06:05:55) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
swoole 版本 4.4.26
解压swoole进入目录
phpize && \
./configure \
--enable-openssl \
--enable-http2 \
--enable-async-redis \
--enable-mysqlnd && \
make && make install
configure: WARNING: unrecognized options: --enable-async-redis
/bin/bash /swoole-src-4.4.26/libtool --mode=compile g++ -I. -I/swoole-src-4.4.26 -DPHP_ATOM_INC -I/swoole-src-4.4.26/include -I/swoole-src-4.4.26/main -I/swoole-src-4.4.26 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/swoole-src-4.4.26 -I/swoole-src-4.4.26/include -I/swoole-src-4.4.26/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /swoole-src-4.4.26/php_swoole_cxx.cc -o php_swoole_cxx.lo
mkdir .libs
g++ -I. -I/swoole-src-4.4.26 -DPHP_ATOM_INC -I/swoole-src-4.4.26/include -I/swoole-src-4.4.26/main -I/swoole-src-4.4.26 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/swoole-src-4.4.26 -I/swoole-src-4.4.26/include -I/swoole-src-4.4.26/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /swoole-src-4.4.26/php_swoole_cxx.cc -fPIC -DPIC -o .libs/php_swoole_cxx.o
In file included from /swoole-src-4.4.26/php_swoole.h:53,
from /swoole-src-4.4.26/php_swoole_cxx.h:19,
from /swoole-src-4.4.26/php_swoole_cxx.cc:1:
/swoole-src-4.4.26/include/swoole.h:627:10: fatal error: openssl/ssl.h: No such file or directory
627 | #include <openssl/ssl.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:192: php_swoole_cxx.lo] Error 1
apt-get install -y \
libcurl4-openssl-dev \
libssl-dev \
supervisor \
unzip \
zlib1g-dev \
--no-install-recommends
docker-php-ext-enable swoole
转载注明:
感谢博主,喝杯咖啡~
感谢博主,喝杯咖啡~
还没有人发表评论