编译php7.1 openssl3.x版本过高?
文章描述了从下载、编译安装OpenSSL到配置PHP并指定OpenSSL路径的详细步骤,包括设置环境变量和使用./configure命令指定openssl路径。 2025-5-25 19:26:24 Author: www.yanglong.pro(查看原文) 阅读量:19 收藏

下载:

wget https://openssl.org/source/openssl-1.1.1u.tar.gz tar -xzvf openssl-1.1.1u.tar.gz cd openssl-1.1.1u

编译安装:

./config --prefix=/usr/local/openssl1.1 --openssldir=/usr/local/openssl1.1/ssl
make -j$(nproc)
make install

临时改环境变量:

export PATH=/usr/local/openssl1.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/openssl1.1/lib:$LD_LIBRARY_PATH

configure php:

./configure --with-mysqli --with-pdo-mysql --enable-mbstring --enable-fpm --with-gd=/usr --with-curl --with-mcrypt --with-openssl --with-freetype-dir --with-zlib --with-jpeg-dir --with-png-dir --with-xpm-dir --enable-pcntl --with-gmp --enable-zip --enable-bcmath --with-openssl=/usr/local/openssl1.1/ --with-openssl-dir=/usr/local/openssl1.1/

编译安装:(略)


文章来源: https://www.yanglong.pro/%e7%bc%96%e8%af%91php7-1-openssl3-x%e7%89%88%e6%9c%ac%e8%bf%87%e9%ab%98%ef%bc%9f/
如有侵权请联系:admin#unsafe.sh