-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX nothing below PHP 8.1 installs in Ubuntu 22.04 (RSA_SSLV23_PADDING
undeclared in OpenSSL 3.0.0)
#718
Comments
|
then I used
results in:
|
|
all of them seem to fail because of the same error:
|
RSA_SSLV23_PADDING
undeclared)
RSA_SSLV23_PADDING
undeclared)RSA_SSLV23_PADDING
undeclared in OpenSSL 3.0.0)
I'm also running into this issue, a temporary "hack" I'm looking into trying would be to install a local copy of OpenSSL 1.x libs in your userdir and set then openssl libdir (i think it's |
I used the https://github.com/php-build/php-build/blob/master/build-openssl-1.0.sh script to install OpenSSL 1 and then also tried with |
It seems that the PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.0/lib/pkgconfig" phpenv install 8.0.17 According to these tests: https://github.com/nicolasleborgne/php-build/runs/6644800527?check_suite_focus=true it seems that Openssl is not the only problem on Ubuntu 22.04 for building Php versions. Since all the supported versions are OK, I do not think I will spend more time on this. |
On Fedora 37 this fails for me after running
|
I, too, am having trouble with the same error.
Has the fact that OpenSSl has been updated to address the vulnerability had any impact? |
@miracle777 |
Thank you very much. Could this be an effect of the measures taken to address the OpenSSL vulnerability? I think so. https://itsubuntu.com/install-php-mcrypt-extension-on-ubuntu-22-04/
|
I found the following article. |
Yes. You need to install OpenSSL |
Thanks for letting us know. |
Thank you very much. The referenced article is here. PHP_BUILD_CONFIGURE_OPTS="--with-bz2 --with-openssl=/home/***/openssl-1.1.1s/opt/build --with-iconv --with-tidy --with-external-pcre --with-sodium --with-zip --enable-intl --with-pdo-pgsql --with-pear" PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j$(grep processor /proc/cpuinfo | wc -l)" phpenv install --ini development 7.3.29
|
Thank you for all the information you have given me. |
Note: Do not run the commands until you read to the end. Apparently, I was required to install PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1.1/lib/pkgconfig" phpenv install 8.2.1 And a new error appeared, something about sqlite3 not installed! (Even though it is! It's looking for a dev version looks like). But sure, let's install it with Did it work? Nope, something about build-openssl-1.1.1.sh#!/bin/sh
#
# PHP 5.6 and older require OpenSSL 1.0.2, which is too old for most modern
# operating systems. This script downloads, builds and installs OpenSSL 1.0.2
# for use in PHP builds.
#
set -ex
BUILD_DIR=/tmp/openssl-1.1.1-build
TARBALL=openssl-1.1.1o.tar.gz
MD5SUM=d05e96e200d2ff0aef20c114cb5f17bf
PREFIX=/usr/local/opt/openssl@1.1.1
if command -v sudo ; then
SUDO=sudo
else
SUDO=
fi
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
curl -OLs https://www.openssl.org/source/$TARBALL
if command -v md5sum; then
echo "$MD5SUM $TARBALL" | md5sum -c
fi
tar xzf $TARBALL --strip-components=1 -C "$BUILD_DIR"
CONFIG_SCRIPT=./config
ARCH_ARGS=""
if [ "$(uname -s)" = Darwin ] && [ "$(uname -m)" = x86_64 ]; then
ARCH_ARGS="darwin64-x86_64-cc enable-ec_nistp_64_gcc_128"
CONFIG_SCRIPT=./Configure
fi
$CONFIG_SCRIPT -fPIC shared no-ssl2 no-ssl3 no-zlib $ARCH_ARGS --prefix=/usr/local/opt/openssl@1.1.1
make depend
make -j $(nproc)
$SUDO make install_sw
# if this multiarch system uses lib64, create a symlink for it
# this will ensure that PHP configure script will succeed with any
# combination of --with-openssl and --with-libdir
if [ -d /usr/lib64 ]; then
$SUDO ln -s "$PREFIX/lib" "$PREFIX/lib64"
fi
rm -rf "$BUILD_DIR" |
As someone who suffered doing this recently here's how to do it without modifying the php-build sources. This is for PHP 7.4.30.
Make sure pkgconfig and all your PHP requirements are installed (bzip2, libpng-dev etc). Export
Install with phpenv:
Installation will complete without errors. |
I was facing the same error with Homebrew. The following steps resolved it, combining ideas from here and here:
|
I used this patch
before
to compile PHP 8.0.30 from source with openssl 3.1.3 |
@ildar-aim is on the correct path. Instead of compiling OpenSSL 1.1.x we can patch the PHP previous had a check for the constant PR soon follows. |
Since #758 was merged this issue should be resolved now:
|
my system has
openssl 3.0.2-0ubuntu1.1
~/.phpenv/plugins/php-build/install-dependencies.sh
:The text was updated successfully, but these errors were encountered: