我想构建带有openssl3支持的php8.1。首先,我编译并安装了openssl3
./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。
./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手册页。
我做错了什么?
发布于 2022-08-27 11:08:24
良好配置
./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 \https://stackoverflow.com/questions/73488283
复制相似问题