Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Ruby 2.3.6 fails (related to OpenSSL 1.0.2o) #1212

Closed
europ opened this issue Jun 17, 2018 · 5 comments
Closed

Installing Ruby 2.3.6 fails (related to OpenSSL 1.0.2o) #1212

europ opened this issue Jun 17, 2018 · 5 comments

Comments

@europ
Copy link

europ commented Jun 17, 2018

Installing Ruby 2.3.6 always results in a fail.

Environment:
OS = Ubuntu 16.04.4 x86_64 Linux
rbenv = 2.5.1
ruby-build = 20180601-6-ge73041e


The previous installations failed on an invalid OpenSSL version (more specifically on 1.1).

OpenSSL "/usr/include/openssl/asn1_mac.h:10:2: error: #error This file is obsolete; please update your software."

I had the exactly same error message as it is described in #1207.

The openssl extension of Ruby version before 2.4 is not compatible with OpenSSL 1.1.x.

Quoted from the Wiki.

So, I installed OpenSSL_1_0_2o (OpenSSL 1.0.x is recommended) and specified the OpenSSL location manually by:

export RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/ssl

Executing the following command:

rbenv install 2.3.6

Will result in a fail:

Installing ruby-2.3.6...

BUILD FAILED (Ubuntu 16.04 using ruby-build 20180601-6-ge73041e)

Inspect or clean up the working tree at /tmp/ruby-build.20180617211459.12406
Results logged to /tmp/ruby-build.20180617211459.12406.log

Last 10 log lines:
installing default bigdecimal libraries
make[2]: Leaving directory '/tmp/ruby-build.20180617211459.12406/ruby-2.3.6/ext/dbm'
make[2]: Leaving directory '/tmp/ruby-build.20180617211459.12406/ruby-2.3.6/ext/-test-/string'
linking shared-object bigdecimal.so
make[2]: Leaving directory '/tmp/ruby-build.20180617211459.12406/ruby-2.3.6/ext/bigdecimal'
linking shared-object date_core.so
make[2]: Leaving directory '/tmp/ruby-build.20180617211459.12406/ruby-2.3.6/ext/date'
make[1]: Leaving directory '/tmp/ruby-build.20180617211459.12406/ruby-2.3.6'
uncommon.mk:203: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2

The log file:
/tmp/ruby-build.20180617211459.12406.log

The issue may be related to the #1146 which was solved by specifying the OpenSSL directory via --with-openssl-dir=/usr/local/ssl in CONFIGURE_OPTS environment variable.

Installing any other ruby versions 2.4. and above such as 2.5.1 were successfully installed.

@europ europ changed the title Ubuntu - installing Ruby 2.3.6 fails (related to OpenSSL 1.0.2o) Installing Ruby 2.3.6 fails (related to OpenSSL 1.0.2o) Jun 17, 2018
@p-mongo
Copy link

p-mongo commented Jul 17, 2018

What does this yield?

find /usr/local/ssl |grep libcrypto

@europ
Copy link
Author

europ commented Jul 17, 2018

@p-mongo the result of find /usr/local/ssl | grep libcrypto is:

/usr/local/ssl/lib/pkgconfig/libcrypto.pc
/usr/local/ssl/lib/libcrypto.a

@p-mongo
Copy link

p-mongo commented Jul 17, 2018

You built openssl without shared libraries. My reading of their readme suggests this isn't the default behavior. How was openssl built?

@europ
Copy link
Author

europ commented Jul 17, 2018

I followed the instructions in INSTALL file - section Quick Start.

  $ ./config
  $ make
  $ make test
  $ make install

Every step was successful.

@p-mongo
Copy link

p-mongo commented Jul 18, 2018

My ubuntu 16.04 comes with openssl 1.0.2, not 1.1. Regardless, try this:

./config shared
make clean

And then redo everything else.

@europ europ closed this as completed Jul 18, 2018
gemmaro pushed a commit to gemmaro/ruby-build that referenced this issue Aug 17, 2024
fish ships with a much more capable rbenv completion script since fish 2.0.

Fixes rbenv#1212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants