Can't install ruby 3.2.0 on Ubuntu 22.04 WSL #2199
-
I'm trying to install Ruby 3.2.0 in Ubuntu 22.04 WSL but I'm getting this error: ➜ rbenv install 3.2.0
To follow progress, use 'tail -f /tmp/ruby-build.20230530141556.71089.log' or pass --verbose
Downloading ruby-3.2.0.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.0.tar.gz
Installing ruby-3.2.0...
ruby-build: using readline from homebrew
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew
BUILD FAILED (Ubuntu 22.04 using ruby-build 20230512)
Inspect or clean up the working tree at /tmp/ruby-build.20230530141556.71089.ODe10q
Results logged to /tmp/ruby-build.20230530141556.71089.log
Last 10 log lines:
Try running `apt-get install -y libssl-dev` to fetch missing dependencies.
Configure options used:
--prefix=/home/roger/.rbenv/versions/3.2.0
--enable-shared
--with-readline-dir=/home/linuxbrew/.linuxbrew/opt/readline
--with-libyaml-dir=/home/linuxbrew/.linuxbrew/opt/libyaml
--with-gmp-dir=/home/linuxbrew/.linuxbrew/opt/gmp
LDFLAGS=-L/home/roger/.rbenv/versions/3.2.0/lib
CPPFLAGS=-I/home/roger/.rbenv/versions/3.2.0/include libssl-dev is already installed: ➜ sudo apt-get install -y libssl-dev
[sudo] password for roger:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libssl-dev is already the newest version (3.0.2-0ubuntu1.9).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded. An extended version of the error log is: installing bundled gems: /home/roger/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0
minitest 5.16.3
power_assert 2.0.3
rake 13.0.6
test-unit 3.5.7
rexml 3.2.5
rss 0.2.9
net-ftp 0.2.0
net-imap 0.3.4
net-pop 0.1.2
net-smtp 0.3.3
matrix 0.4.2
prime 0.1.2
rbs 2.8.2
typeprof 0.21.3
debug 1.7.1
installing bundled gem cache: /home/roger/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/cache
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Try running `apt-get install -y libssl-dev` to fetch missing dependencies.
Configure options used:
--prefix=/home/roger/.rbenv/versions/3.2.0
--enable-shared
--with-readline-dir=/home/linuxbrew/.linuxbrew/opt/readline
--with-libyaml-dir=/home/linuxbrew/.linuxbrew/opt/libyaml
--with-gmp-dir=/home/linuxbrew/.linuxbrew/opt/gmp
LDFLAGS=-L/home/roger/.rbenv/versions/3.2.0/lib
CPPFLAGS=-I/home/roger/.rbenv/versions/3.2.0/include Let me know if there is other info that can help identify the problem! |
Beta Was this translation helpful? Give feedback.
Answered by
rogeraraujo90
May 30, 2023
Replies: 1 comment 2 replies
-
I was able to resolve this issue by running: RUBY_CONFIGURE_OPTS=--with-openssl-dir=/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.1.0 rbenv install 3.2.0 Not sure why. But I've posted it here in case someone else has the same issue. I'm ok with closing this discussion! |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
rogeraraujo90
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was able to resolve this issue by running:
Not sure why. But I've posted it here in case someone else has the same issue. I'm ok with closing this discussion!