我可以用rvm安装任何
ruby,我总是得到这个,在linux linux(manjaro)
[anquegi@manjaro-pc ~]$rvm install 2.1.6 --autolibs=packages ruby-2.1.6 - #removing src/ruby-2.1.6.. Searching for binary rubies,this might take some time. No binary rubies available for: manjaro/16.06-pre1/x86_64/ruby-2.1.6. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for manjaro. Requirements installation successful. Installing Ruby from source to: /home/anquegi/.rvm/rubies/ruby-2.1.6,this may take a while depending on your cpu(s)... ruby-2.1.6 - #downloading ruby-2.1.6,this may take a while depending on your connection... ruby-2.1.6 - #extracting ruby-2.1.6 to /home/anquegi/.rvm/src/ruby-2.1.6.... ruby-2.1.6 - #configuring..................................................... ruby-2.1.6 - #post-configuration.. ruby-2.1.6 - #compiling............................................................................................... Error running '__rvm_make -j4',showing last 15 lines of /home/anquegi/.rvm/log/1458754652_ruby-2.1.6/make.log #define OSSL_SSL_METHOD_ENTRY(name) { #name,(SSL_METHOD *(*)(void))name##_method } ^ Makefile:280: recipe for target 'ossl_ssl.o' Failed make[2]: *** [ossl_ssl.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6/ext/openssl' exts.mk:192: recipe for target 'ext/openssl/all' Failed make[1]: *** [ext/openssl/all] Error 2 make[1]: *** Waiting for unfinished jobs.... linking shared-object socket.so make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6/ext/socket' make[1]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6' uncommon.mk:180: recipe for target 'build-ext' Failed make: *** [build-ext] Error 2 ++ return 2 There has been an error while running make. Halting the installation.
尝试没有autolibs:
[anquegi@manjaro-pc ~]$rvm install 2.1.6 ruby-2.1.6 - #removing src/ruby-2.1.6.. Searching for binary rubies,this might take some time. No binary rubies available for: manjaro/16.06-pre1/x86_64/ruby-2.1.6. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for manjaro. Requirements installation successful. Installing Ruby from source to: /home/anquegi/.rvm/rubies/ruby-2.1.6,this may take a while depending on your connection... ruby-2.1.6 - #extracting ruby-2.1.6 to /home/anquegi/.rvm/src/ruby-2.1.6.... ruby-2.1.6 - #configuring..................................................... ruby-2.1.6 - #post-configuration.. ruby-2.1.6 - #compiling........................................................................................ Error running '__rvm_make -j4',showing last 15 lines of /home/anquegi/.rvm/log/1458753526_ruby-2.1.6/make.log #define OSSL_SSL_METHOD_ENTRY(name) { #name,(SSL_METHOD *(*)(void))name##_method } ^ Makefile:280: recipe for target 'ossl_ssl.o' Failed make[2]: *** [ossl_ssl.o] Error 1 make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6/ext/openssl' exts.mk:192: recipe for target 'ext/openssl/all' Failed make[1]: *** [ext/openssl/all] Error 2 make[1]: *** Waiting for unfinished jobs.... installing default callback libraries linking shared-object dl/callback.so make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6/ext/dl/callback' make[1]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6' uncommon.mk:180: recipe for target 'build-ext' Failed make: *** [build-ext] Error 2 ++ return 2 There has been an error while running make. Halting the installation.
或其他ruby版本:
[anquegi@manjaro-pc ~]$rvm install 2.2.3 Searching for binary rubies,this might take some time. No binary rubies available for: manjaro/16.06-pre1/x86_64/ruby-2.2.3. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for manjaro. Requirements installation successful. Installing Ruby from source to: /home/anquegi/.rvm/rubies/ruby-2.2.3,this may take a while depending on your cpu(s)... ruby-2.2.3 - #downloading ruby-2.2.3,this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 12.7M 100 12.7M 0 0 435k 0 0:00:29 0:00:29 --:--:-- 422k No checksum for downloaded archive,recording checksum in user configuration. ruby-2.2.3 - #extracting ruby-2.2.3 to /home/anquegi/.rvm/src/ruby-2.2.3.... ruby-2.2.3 - #configuring......................................................... ruby-2.2.3 - #post-configuration.. ruby-2.2.3 - #compiling................................................................................ Error running '__rvm_make -j4',showing last 15 lines of /home/anquegi/.rvm/log/1458753949_ruby-2.2.3/make.log make[1]: *** [ext/openssl/all] Error 2 make[1]: *** Waiting for unfinished jobs.... compiling stubs.c linking shared-object strscan.so make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/strscan' installing tcltklib libraries installing default tcltklib libraries linking shared-object tkutil.so make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/tk/tkutil' linking shared-object tcltklib.so make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/tk' make[1]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3' uncommon.mk:189: recipe for target 'build-ext' Failed make: *** [build-ext] Error 2 ++ return 2 There has been an error while running make. Halting the installation.
和旗帜
anquegi@manjaro-pc ~]$rvm CFLAGS="-std=iso9899:1999" install 2.2.3 ruby-2.2.3 - #removing src/ruby-2.2.3.. Searching for binary rubies,this may take a while depending on your connection... ruby-2.2.3 - #extracting ruby-2.2.3 to /home/anquegi/.rvm/src/ruby-2.2.3.... ruby-2.2.3 - #configuring......................................................... ruby-2.2.3 - #post-configuration.. ruby-2.2.3 - #compiling.............................................................................. Error running '__rvm_make -j4',showing last 15 lines of /home/anquegi/.rvm/log/1458754170_ruby-2.2.3/make.log make[1]: *** [ext/openssl/all] Error 2 make[1]: *** Waiting for unfinished jobs.... installing default socket libraries compiling init.c compiling constants.c checking ../.././parse.y and ../.././ext/ripper/eventids2.c installing default ripper libraries linking shared-object ripper.so make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/ripper' linking shared-object socket.so make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/socket' make[1]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3' uncommon.mk:189: recipe for target 'build-ext' Failed make: *** [build-ext] Error 2 ++ return 2 There has been an error while running make. Halting the installation.
我也尝试重新安装base devel,
解决方法
看来openssl
here的问题是补丁
curl https://github.com/ruby/ruby/commit/801e1fe46d83c856844ba18ae4751478c59af0d1.diff > openssl.patch rvm install --patch ./openssl.patch 2.0.0