pecl install swoole
安装swoole报错,
fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
^~~~~~~~~~~~~~~
1 error generated.
make: *** [php_swoole_cxx.lo] Error 1
————————————————
解决办法
apt-get update
docker
php
安装Swoole
扩展
1 查看phpinfo()
, php.ini
文件配置位置
Configuration File (php.ini) Path | /usr/local/etc/php
2 进入容器,创建配置
docker exec -it mmy-php /bin/bash
cd /usr/local/etc/php
cp php.ini-development php.ini
3 进入php
容器内执行, 安装redis
:
pecl install swoole
rm -rf /tmp/pear
4 修改php.ini
,添加:extension=swoole.so
echo "\nextension=swoole.so " >> /usr/local/etc/php/php.ini
5 重启php
容器
docker restart mmy-php
6 查看phpinfo()