dnf install php-cli
php -v
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
dnf install php-pear php-devel
dnf install make
running: make
sh: make: 未找到命令
ERROR: `make' failed
dnf install openssl-devel
/var/tmp/swoole/ext-src/php_swoole.h:99:2: 错误:#error "Enable openssl support, require openssl library"
 #error "Enable openssl support, require openssl library"
In file included from /var/tmp/swoole/include/swoole_socket.h:34,
                 from /var/tmp/swoole/include/swoole_coroutine.h:22,
                 from /var/tmp/swoole/ext-src/php_swoole_coroutine.h:22,
                 from /var/tmp/swoole/ext-src/php_swoole_cxx.h:20,
                 from /var/tmp/swoole/ext-src/php_swoole.cc:16:
/var/tmp/swoole/include/swoole_ssl.h:23:10: 致命错误:openssl/ssl.h:No such file or directory
 #include <openssl/ssl.h>
make: *** [Makefile:194:ext-src/php_swoole.lo] 错误 1
ERROR: `make' failed
dnf install php-mysqlnd
PHP Warning:  PHP Startup: Unable to load dynamic library 'swoole' (tried: /usr/lib64/php/modules/swoole (/usr/lib64/php/modules/swoole: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/swoole.so (/usr/lib64/php/modules/swoole.so: undefined symbol: mysqlnd_find_charset_nr)) in Unknown on line 0
pecl install swoole
Build process completed successfully
Installing '/usr/lib64/php/modules/swoole.so'
Installing '/usr/include/php/ext/swoole/config.h'
install ok: channel://pecl.php.net/swoole-4.5.7
configuration option "php_ini" is not set to php.ini location
You should add "extension=swoole.so" to php.ini
echo "extension=swoole.so" > /etc/php.d/40-swoole.ini

标签: none