centos php5.6 openssl 扩展一直报错
yum install openssl 默认的 版本是 1.1.1不可使用
解决方案 :
wget https://www.openssl.org/source/openssl-0.9.8v.tar.gz
tar -xzvf openssl-0.9.8v.tar.gz
cd openssl-0.9.8v
yum remove -y openssl 卸载默认的版本
./config --prefix=/usr/local --openssldir=/usr/local/ssl
make && make install(可能会出错)
rm -f /usr/bin/pod2man (尝试解决方案)
./config shared --prefix=/usr/local --openssldir=/usr/local/ssl
make clean
make && make install
cp /openssl-0.9.8v/libssl.so.0.9.8 /usr/lib64/
cp /openssl-0.9.8v/libcrypto.so.0.9.8 /usr/lib64/
openssl version 查看版本,已变更
cd /php-5.6.40/ext/openssl
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install (成功)
Libraries have been installed in:
/php-5.6.40/ext/openssl/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

浙公网安备 33010602011771号