简体   繁体   中英

Ubuntu's rvm ruby and openssl

I am trying to install ruby with rvm on Ubuntu. I installed rvm with the synaptic package manager.

$ which rvm
/usr/bin/rvm
$ rvm --version

rvm 1.6.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]

I try to install ruby:

$ rvm install 1.9.2
...
ERROR: Error running 'make ', please read /usr/share/ruby-rvm/log/ruby-1.9.2-p180/make.log
ERROR: There has been an error while running make. Halting the installation.

The problem in the logfile is openssl related:

ossl_ssl.c:110:1: error: ‘SSLv2_method’ undeclared here (not in a function)

On https://rvm.io/packages/openssl/ it says to do $ rvm requirements but it gives an error:

$ rvm requirements
ERROR: Unrecognized command line argument: 'requirements' ( see: 'rvm usage' )

On the same page, it asks to do $ rvm reinstall 1.9.2 --with-openssl-dir=/usr/local , but this gives me the same errors during ruby's compilation. For the second approach on the same page, doing rvm pkg install openssl gives me

$ rvm pkg install openssl
ERROR: Unrecognized command line argument: 'pkg' ( see: 'rvm usage' )

Openssl is apparently installed:

$ dpkg --get-selections | grep openssl
openssl                     install
python-openssl              install

You're running an outdated version of RVM. You should go with the recommended install path explained on http://rvm.io and don't use a package installer. To fix check this instruction https://stackoverflow.com/a/9056395/497756 .

Also don't use 1.9.2 use the current 1.9.3 ruby instead and for new projects use 2.0.0 which is in RC1 and should be released soon.

如果你使用ubuntu,只需使用这个ppa中的ruby。

http://blog.brightbox.co.uk/posts/next-generation-ruby-packages-for-ubuntu

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM