Closed camerontweedle closed 5 years ago
Was able to finally get myself up and running using rvm - couldn't spend another day of not getting ANY work done.
2.0.0-p648 installed without issue for me on RVM, though, so my system can't be THAT messed up. Not sold on my RVM setup right now, though, so if someone would like to try and help debug this for me on rbenv/ruby-build, I'm still interested. Let me know what else you need
@camerontweedle what gcc version do you have? Older versions of ruby tend to fail when built with gcc in version greater than 6.
Try to install gcc-6
and run CC=$(which gcc-6) rbenv install 'your_desired_version'
.
EDIT: Oh, and I'd also try with libssl1.0-dev
installed.
Chiming in out of the ether to say that I had the same problem, installing gcc-6
and libssl1.0-dev
and running CC=$(which gcc-6) rbenv install -s
worked for me! Thanks!
Suggestions given worked for me too. Thank you very much guys.
The solution provided above still works, is there anything that needs to be done to close this issue?
work for me too on linux tina 19.2 thx. run install libdev, gcc6, execute command: CC=$(which gcc-6) and rbenv install rbenv install 2.0.0-p648
Can confirm that gcc-6
+ openssl@1.0
works (on MacOS BigSur 11.2.1, with homebrew):
brew install gcc@6
brew install rbenv/tap/openssl@1.0
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" CC=$(which gcc-6) rbenv install 2.0.0-p647
Also had Xcode 12 installed and if the above command didn't work, was going to downgrade to 11 to try again.
It seems like people using rvm
are having the same issue and they've come up with a slightly different solution of passing an extra compiler flag (export optflags="-Wno-error=implicit-function-declaration"
), see here: https://stackoverflow.com/a/64829129/7724157
Spoke too soon. After installation, running gem install bundler
(or any gem) gives me the following error:
ERROR: Loading command: install (LoadError)
cannot load such file -- socket
ERROR: While executing gem ... (NoMethodError)
Doing some searching it seems it's an issue with openssl
... 🥲 back to square one.
Finally, this worked:
export LDFLAGS="-L/usr/local/opt/openssl@1.0/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.0/include"
CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" rbenv install 2.0.0-p647
background: I HAD 2.0.0-p648 installed just fine, but then I think my openssl got updated or something and I was getting bundler errors re: SSL all of a sudden
So, after trying a number of other options, I decided to uninstall and install ruby fresh. Haven't been able to reinstall ever since.
I've tried just about everything from the wiki, including patches. I've tried it BOTH with
libssl-dev
AND withlibssl1.0.0
and just about every combination of those options. The closest I can get to "progress" is a different error message when I try without a patchHere's my install command:
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/opt/openssl PKG_CONFIG_PATH=/opt/openssl/lib/pkgconfig rbenv install 2.0.0-p648
And here's the log:
otherwise, I keep getting the
/usr/include/openssl/asn1_mac.h:10:2: error: #error "This file is obsolete; please update your software."
error.Unfortunately, the ruby versioning is outside my control, so I'm forced to used this as well as a number of other, older ruby versions for work, so having a viable version switcher is a really key factor. If I don't get anywhere with this tomorrow, I'm afraid I'm going to have to drop rbenv and give RVM another kick at the can, and I'd really like to avoid that, as I appreciate rbenv's lighter footprint, so any assistance is appreciated.
Thanks