"error: 'RSA_SSLV23_PADDING' undeclared" while installing Ruby 2.6.5 on Ubunut 24.04 despite explicitly using OpenSSL 1.1 #2381
-
So I'm getting the error Having looked around the internet, I came across this SO thread, so I followed the guide (I only changed where the lib is installed) and tried to let export RUBY_CFLAGS="-Wno-deprecated-declarations"
export CONFIGURE_OPTS="--with-open-ssl-dir=$RBENV_ROOT/deps/lib/openssl"
rbenv install 2.6.5 However that did not change anything and I'm still getting the error. I checked with pgrep if the flag was actually passed to Attached is my build log: For reference here is how I built OpenSSL 1.1: cd $RBENV_ROOT/deps/src
wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz
tar xvzf openssl-1.1.1q.tar.gz
cd openssl-1.1.1q
mkdir -p $RBENV_ROOT/deps/lib/openssl
./config --prefix=$RBENV_ROOT/deps/lib/openssl
make -j$(nproc)
make install
cp -r /etc/ssl/certs/* $RBENV_ROOT/deps/lib/openssl/ssl/certs |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, are you using a recent version of ruby-build?
I see two potential problems here. First is that If you are using an older version of ruby-build, then explicitly setting this might help: export PKG_CONFIG_PATH="$RBENV_ROOT/deps/lib/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" Ref. #2125 (comment) Newer versions of ruby-build automatically set this for you to help with compiling Ruby 2.6. |
Beta Was this translation helpful? Give feedback.
Hi, are you using a recent version of ruby-build?
I see two potential problems here. First is that
--with-openssl-dir
flag was misspelled (there was an extra dash). Second is that it should beexport RUBY_CONFIGURE_OPTS=...
instead of just CONFIGURE_OPTS to ensure that the flags only apply to Ruby and not to compiling any other software.If you are using an older version of ruby-build, then explicitly setting this might help:
Ref. #2125 (comment)
Newer versions of ruby-build automatically set this for you to help with compiling Rub…