RVM在arch linux上安装ruby错误

前端之家收集整理的这篇文章主要介绍了RVM在arch linux上安装ruby错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我可以用rvm安装任何 ruby,我总是得到这个,在linux linux(manjaro)
  1. [anquegi@manjaro-pc ~]$rvm install 2.1.6 --autolibs=packages
  2. ruby-2.1.6 - #removing src/ruby-2.1.6..
  3. Searching for binary rubies,this might take some time.
  4. No binary rubies available for: manjaro/16.06-pre1/x86_64/ruby-2.1.6.
  5. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
  6. Checking requirements for manjaro.
  7. Requirements installation successful.
  8. Installing Ruby from source to: /home/anquegi/.rvm/rubies/ruby-2.1.6,this may take a while depending on your cpu(s)...
  9. ruby-2.1.6 - #downloading ruby-2.1.6,this may take a while depending on your connection...
  10. ruby-2.1.6 - #extracting ruby-2.1.6 to /home/anquegi/.rvm/src/ruby-2.1.6....
  11. ruby-2.1.6 - #configuring.....................................................
  12. ruby-2.1.6 - #post-configuration..
  13. ruby-2.1.6 - #compiling...............................................................................................
  14. Error running '__rvm_make -j4',showing last 15 lines of /home/anquegi/.rvm/log/1458754652_ruby-2.1.6/make.log
  15. #define OSSL_SSL_METHOD_ENTRY(name) { #name,(SSL_METHOD *(*)(void))name##_method }
  16. ^
  17. Makefile:280: recipe for target 'ossl_ssl.o' Failed
  18. make[2]: *** [ossl_ssl.o] Error 1
  19. make[2]: *** Waiting for unfinished jobs....
  20. make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6/ext/openssl'
  21. exts.mk:192: recipe for target 'ext/openssl/all' Failed
  22. make[1]: *** [ext/openssl/all] Error 2
  23. make[1]: *** Waiting for unfinished jobs....
  24. linking shared-object socket.so
  25. make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6/ext/socket'
  26. make[1]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6'
  27. uncommon.mk:180: recipe for target 'build-ext' Failed
  28. make: *** [build-ext] Error 2
  29. ++ return 2
  30. There has been an error while running make. Halting the installation.

尝试没有autolibs:

  1. [anquegi@manjaro-pc ~]$rvm install 2.1.6
  2. ruby-2.1.6 - #removing src/ruby-2.1.6..
  3. Searching for binary rubies,this might take some time.
  4. No binary rubies available for: manjaro/16.06-pre1/x86_64/ruby-2.1.6.
  5. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
  6. Checking requirements for manjaro.
  7. Requirements installation successful.
  8. Installing Ruby from source to: /home/anquegi/.rvm/rubies/ruby-2.1.6,this may take a while depending on your connection...
  9. ruby-2.1.6 - #extracting ruby-2.1.6 to /home/anquegi/.rvm/src/ruby-2.1.6....
  10. ruby-2.1.6 - #configuring.....................................................
  11. ruby-2.1.6 - #post-configuration..
  12. ruby-2.1.6 - #compiling........................................................................................
  13. Error running '__rvm_make -j4',showing last 15 lines of /home/anquegi/.rvm/log/1458753526_ruby-2.1.6/make.log
  14. #define OSSL_SSL_METHOD_ENTRY(name) { #name,(SSL_METHOD *(*)(void))name##_method }
  15. ^
  16. Makefile:280: recipe for target 'ossl_ssl.o' Failed
  17. make[2]: *** [ossl_ssl.o] Error 1
  18. make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6/ext/openssl'
  19. exts.mk:192: recipe for target 'ext/openssl/all' Failed
  20. make[1]: *** [ext/openssl/all] Error 2
  21. make[1]: *** Waiting for unfinished jobs....
  22. installing default callback libraries
  23. linking shared-object dl/callback.so
  24. make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6/ext/dl/callback'
  25. make[1]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.1.6'
  26. uncommon.mk:180: recipe for target 'build-ext' Failed
  27. make: *** [build-ext] Error 2
  28. ++ return 2
  29. There has been an error while running make. Halting the installation.

或其他ruby版本:

  1. [anquegi@manjaro-pc ~]$rvm install 2.2.3
  2. Searching for binary rubies,this might take some time.
  3. No binary rubies available for: manjaro/16.06-pre1/x86_64/ruby-2.2.3.
  4. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
  5. Checking requirements for manjaro.
  6. Requirements installation successful.
  7. Installing Ruby from source to: /home/anquegi/.rvm/rubies/ruby-2.2.3,this may take a while depending on your cpu(s)...
  8. ruby-2.2.3 - #downloading ruby-2.2.3,this may take a while depending on your connection...
  9. % Total % Received % Xferd Average Speed Time Time Time Current
  10. Dload Upload Total Spent Left Speed
  11. 100 12.7M 100 12.7M 0 0 435k 0 0:00:29 0:00:29 --:--:-- 422k
  12. No checksum for downloaded archive,recording checksum in user configuration.
  13. ruby-2.2.3 - #extracting ruby-2.2.3 to /home/anquegi/.rvm/src/ruby-2.2.3....
  14. ruby-2.2.3 - #configuring.........................................................
  15. ruby-2.2.3 - #post-configuration..
  16. ruby-2.2.3 - #compiling................................................................................
  17. Error running '__rvm_make -j4',showing last 15 lines of /home/anquegi/.rvm/log/1458753949_ruby-2.2.3/make.log
  18. make[1]: *** [ext/openssl/all] Error 2
  19. make[1]: *** Waiting for unfinished jobs....
  20. compiling stubs.c
  21. linking shared-object strscan.so
  22. make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/strscan'
  23. installing tcltklib libraries
  24. installing default tcltklib libraries
  25. linking shared-object tkutil.so
  26. make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/tk/tkutil'
  27. linking shared-object tcltklib.so
  28. make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/tk'
  29. make[1]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3'
  30. uncommon.mk:189: recipe for target 'build-ext' Failed
  31. make: *** [build-ext] Error 2
  32. ++ return 2
  33. There has been an error while running make. Halting the installation.

和旗帜

  1. anquegi@manjaro-pc ~]$rvm CFLAGS="-std=iso9899:1999" install 2.2.3
  2. ruby-2.2.3 - #removing src/ruby-2.2.3..
  3. Searching for binary rubies,this may take a while depending on your connection...
  4. ruby-2.2.3 - #extracting ruby-2.2.3 to /home/anquegi/.rvm/src/ruby-2.2.3....
  5. ruby-2.2.3 - #configuring.........................................................
  6. ruby-2.2.3 - #post-configuration..
  7. ruby-2.2.3 - #compiling..............................................................................
  8. Error running '__rvm_make -j4',showing last 15 lines of /home/anquegi/.rvm/log/1458754170_ruby-2.2.3/make.log
  9. make[1]: *** [ext/openssl/all] Error 2
  10. make[1]: *** Waiting for unfinished jobs....
  11. installing default socket libraries
  12. compiling init.c
  13. compiling constants.c
  14. checking ../.././parse.y and ../.././ext/ripper/eventids2.c
  15. installing default ripper libraries
  16. linking shared-object ripper.so
  17. make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/ripper'
  18. linking shared-object socket.so
  19. make[2]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3/ext/socket'
  20. make[1]: Leaving directory '/home/anquegi/.rvm/src/ruby-2.2.3'
  21. uncommon.mk:189: recipe for target 'build-ext' Failed
  22. make: *** [build-ext] Error 2
  23. ++ return 2
  24. There has been an error while running make. Halting the installation.

我也尝试重新安装base devel,

解决方法

看来openssl here的问题是补丁
  1. curl https://github.com/ruby/ruby/commit/801e1fe46d83c856844ba18ae4751478c59af0d1.diff > openssl.patch
  2. rvm install --patch ./openssl.patch 2.0.0

猜你在找的Linux相关文章