简体   繁体   中英

How to enable openssl in RHEL for PHP 7.2?

When I try to install pear library, I got the following error.

PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl' (tried: ext/openssl (ext/openssl: cannot open shared object file: No such file or directory), ext/openssl.so (ext/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: ext/openssl (ext/openssl: cannot open shared object file: No such file or directory), ext/openssl.so (ext/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
No releases available for package "pear.php.net/XML_Parser"
install failed

How to enable openssl?

In php.ini. I have extension=openssl uncommented. But openssl.so file does not exist. Does openssl need to be downloaded and installed separately?

This module might not exist:

$ ls -la /usr/lib64/php-zts/modules/ | grep ssl
$ ls -la /usr/lib64/php/modules/ | grep ssl

Youd don't need to uncomment extension in php.ini, extensions are load dynamicaly.

To check active extensions you can do :

php -me

If there is no openssl, then you need to install it. Checkout rpmfind

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM