首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用openssl配置php-8.1

用openssl配置php-8.1
EN

Stack Overflow用户
提问于 2022-08-25 13:21:55
回答 1查看 644关注 0票数 1

我想构建带有openssl3支持的php8.1。首先,我编译并安装了openssl3

代码语言:javascript
复制
./config -fPIC shared --prefix=/opt/openssl

make test
make install
ln -s /opt/openssl/lib64/libssl.so.3 /usr/lib64/libssl.so.3
ln -s /opt/openssl/lib64/libcrypto.so.3 /usr/lib64/libcrypto.so.3
sudo mv /bin/openssl /bin/openssl.backup
ln -s /opt/openssl/bin/openssl /usr/bin/
openssl version
OpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022)

接下来,我尝试配置php-8.1。

代码语言:javascript
复制
./configure --with-config-file-path=/etc/php \
--sysconfdir=/etc/php.d \
--enable-mysqlnd \
--with-pdo-mysql \
--with-pdo-mysql=mysqlnd \
--with-pdo-pgsql=/usr/bin/pg_config \
--enable-bcmath \
--enable-fpm \
--with-fpm-user=root \
--with-fpm-group=root \
--enable-mbstring \
--enable-phpdbg \
--enable-shmop \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--with-zlib \
--with-curl \
--with-pear \
--with-openssl=/opt/openssl \
--with-openssl-dir=/opt/openssl \
--enable-pcntl \
--enable-gd \
--with-jpeg \
--with-mysqli \
--with-readline \
--with-freetype \
--with-ldap

我收到一个错误:

检查openssl >= 1.0.2.没有配置:错误:包需求(openssl >= 1.0.2)未满足:

找不到'openssl‘软件包

如果在非标准前缀中安装了软件,请考虑调整PKG_CONFIG_PATH环境变量。

或者,您可以设置环境变量OPENSSL_CFLAGS和OPENSSL_LIBS,以避免调用pkg-config。有关详细信息,请参阅pkg-config手册页。

我做错了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-08-27 11:08:24

良好配置

代码语言:javascript
复制
./configure  OPENSSL_CFLAGS=-I/opt/openssl/include/ OPENSSL_LIBS="-L/opt/openssl/lib64/ -lssl -lcrypto" \
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
--with-config-file-path=/etc/php \
--sysconfdir=/etc/php.d \
--enable-mysqlnd \
--with-pdo-mysql \
--with-pdo-mysql=mysqlnd \
--with-pdo-pgsql=/usr/bin/pg_config \
--enable-bcmath \
--enable-fpm \
--with-fpm-user=root \
--with-fpm-group=root \
--enable-mbstring \
--enable-phpdbg \
--enable-shmop \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--with-zlib \
--with-curl=/opt/curl \
--with-pear \
--with-openssl=/opt/openssl/bin \
--enable-pcntl \
--enable-gd \
--with-jpeg \
--with-mysqli \
--with-readline \
--with-freetype \
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73488283

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档