I am working on an app that was written using Ruby 2.3.0 (with Rails) and my operating system is Linux Ubuntu 21.1. (Hoping to upgrade the project's version of Ruby but having trouble doing that as well)
To get the app working, my first notion was to use rbenv to install 2.3.0, but after much trouble shooting I continue to receive the following errors:
~$ rbenv install 2.3.0
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.bz2
Installing ruby-2.3.0...
WARNING: ruby-2.3.0 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
BUILD FAILED (Ubuntu 21.10 using ruby-build 20211203)
Inspect or clean up the working tree at /tmp/ruby-build.20211214112011.528089.XXe70o
Results logged to /tmp/ruby-build.20211214112011.528089.log
Last 10 log lines:
linking shared-object nkf.so
make[2]: Leaving directory '/tmp/ruby-build.20211214112011.528089.XXe70o/ruby-2.3.0/ext/nkf'
linking shared-object bigdecimal.so
make[2]: Leaving directory '/tmp/ruby-build.20211214112011.528089.XXe70o/ruby-2.3.0/ext/bigdecimal'
linking shared-object date_core.so
make[2]: Leaving directory '/tmp/ruby-build.20211214112011.528089.XXe70o/ruby-2.3.0/ext/date'
linking shared-object ripper.so
make[2]: Leaving directory '/tmp/ruby-build.20211214112011.528089.XXe70o/ruby-2.3.0/ext/ripper'
make[1]: Leaving directory '/tmp/ruby-build.20211214112011.528089.XXe70o/ruby-2.3.0'
Error log file:
I have tried to install openssl 1.0 using:
~$ brew install rbenv/tap/[email protected]
x86_64cpuid.s: Assembler messages: x86_64cpuid.s:2: Error: unknown
pseudo-op: `.private_extern' x86_64cpuid.s:3: Error: unknown
pseudo-op: `.mod_init_func' x86_64cpuid.s:7: Error: unknown pseudo-op:
`.private_extern' make[1]: *** [<builtin>: x86_64cpuid.o] Error 1
make[1]: Leaving directory
'/tmp/opensslA1.0-20211213-493929-qg8eui/openssl-1.0.2t/crypto' make:
*** [Makefile:287: build_crypto] Error 1
If reporting this issue please do so at (not Homebrew/brew or
Homebrew/core): https://github.com/rbenv/homebrew-tap/issues
These open issues may also help: `brew install rbenv/tap/[email protected]` not working anymore https://github.com/rbenv/homebrew-tap/issues/1
I followed the link in the error message, and tried the advice there:
~$ brew tap rbenv/tap
~$ brew install rbenv/tap/[email protected]
x86_64cpuid.s: Assembler messages:
x86_64cpuid.s:2: Error: unknown pseudo-op: `.private_extern'
x86_64cpuid.s:3: Error: unknown pseudo-op: `.mod_init_func'
x86_64cpuid.s:7: Error: unknown pseudo-op: `.private_extern'
make[1]: *** [<builtin>: x86_64cpuid.o] Error 1
make[1]: Leaving directory '/tmp/opensslA1.0-20211213-498635-w2ky1d/openssl-1.0.2t/crypto'
make: *** [Makefile:287: build_crypto] Error 1
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/rbenv/homebrew-tap/issues
These open issues may also help:
`brew install rbenv/tap/[email protected]` not working anymore https://github.com/rbenv/homebrew-tap/issues/1
I have also attempted to upgrade the app's version of ruby, and continue to run into errors - such as outdated dependencies. I am new to ruby and rails and am still learning!
This is my first post, so apologies if it's not great or I missed some details. I am happy to provide any further information needed.
Thank you so much for your help.
Thanks to @Casper's help, I solved the problem.
For recent releases of Ubuntu, rbenv fails to install Ruby below 2.4 because of the mismatching OpenSSL dependency.
The problem was solved for me by using the Ubuntu 16.04 version that was installed on a different computer.