Skip to content

Instantly share code, notes, and snippets.

@twentythousandphantoms
Last active December 15, 2018 13:18
Show Gist options
  • Save twentythousandphantoms/9fcab3d117becd3a9b7a224672309108 to your computer and use it in GitHub Desktop.
Save twentythousandphantoms/9fcab3d117becd3a9b7a224672309108 to your computer and use it in GitHub Desktop.
Problem: ruby <2.5 on ubuntu 18 - installation failed
% rbenv install 2.3.4
Downloading ruby-2.3.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.4.tar.bz2
Installing ruby-2.3.4...
BUILD FAILED (Ubuntu 18.04 using ruby-build 20170726)
Inspect or clean up the working tree at /tmp/ruby-build.20181215160220.6580
Results logged to /tmp/ruby-build.20181215160220.6580.log
Last 10 log lines:
CCLD libffi.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[5]: Leaving directory '/tmp/ruby-build.20181215160220.6580/ruby-2.3.4/ext/fiddle/libffi-3.2.1'
make[4]: Leaving directory '/tmp/ruby-build.20181215160220.6580/ruby-2.3.4/ext/fiddle/libffi-3.2.1'
make[3]: Leaving directory '/tmp/ruby-build.20181215160220.6580/ruby-2.3.4/ext/fiddle/libffi-3.2.1'
linking shared-object fiddle.so
make[2]: Leaving directory '/tmp/ruby-build.20181215160220.6580/ruby-2.3.4/ext/fiddle'
make[1]: Leaving directory '/tmp/ruby-build.20181215160220.6580/ruby-2.3.4'
uncommon.mk:203: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
REASON:
https://bugs.ruby-lang.org/issues/14076
SOLUTION:
% sudo apt-get install gcc-6 g++-6
% CC=/usr/bin/gcc-6 rbenv install 2.3.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment