OpenSSL library could not be found (Ubuntu 20.04 on x86_64 using ruby-build 20240530.1 and linuxbrew) #2405
Replies: 2 comments 3 replies
-
Hi, not sure what went wrong, but you should also take a look at the Furthermore, you shouldn't need to set any environment variables such as RUBY_CONFIGURE_OPTS or PKG_CONFIG_PATH for your Linuxbrew openssl to be picked up: ruby-build is smart enough to either link to a compatible system OpenSSL version or, as a fallback, to search Homebrew/Linuxbrew for compatible versions. I'm also not sure if it's necessary to set LIBRARY_PATH or LD_ LIBRARY_PATH, but I've never used those either. (Note that I do not use Linuxbrew on Ubuntu, but Homebrew on a Mac.) |
Beta Was this translation helpful? Give feedback.
-
Make sure you install the required dependencies as suggested in the wiki. $ sudo apt install libssl-dev I don't really have openssl installed, so it works for me. |
Beta Was this translation helpful? Give feedback.
-
I'm having build failures with
rbenv
and linuxbrew. The farthest I've gotten in the build is getting the errorI'm pretty stumped with this, because I think I've been correctly passing the location of the linuxbrew-installed OpenSSL library - see below.
Note that the values of my
LIBRARY_PATH
environment variable is/home/linuxbrew/.linuxbrew/lib
.This is the build command I'm running. I've already validated that the build fails earlier if I don't explicitly set those environment variables.
The contents of
/tmp/ruby-build.20240608213343.196816.log
:Details
What I've tried:
LIBRARY_PATH
LD_LIBRARY_PATH
--with-openssl-dir
PKG_CONFIG_PATH
/home/linuxbrew/.linuxbrew/lib
/home/linuxbrew/.linuxbrew/lib
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.3.1
$(brew --prefix openssl@3)/lib/pkgconfig
OpenSSL library could not be found
/home/linuxbrew/.linuxbrew/lib
""
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.3.1
$(brew --prefix openssl@3)/lib/pkgconfig
libcrypt.so.2: cannot open shared object file: No such file or directory
/home/linuxbrew/.linuxbrew/lib
""
""
""
libcrypt.so.2: cannot open shared object file: No such file or directory
Beta Was this translation helpful? Give feedback.
All reactions