我正在尝试在Ubuntu上使用rvm安装ruby。我用synaptic包管理器安装了rvm。
$ which rvm
/usr/bin/rvm
$ rvm --version
rvm 1.6.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]
我尝试安装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.
日志文件中的问题与openssl相关:
ossl_ssl.c:110:1: error: ‘SSLv2_method’ undeclared here (not in a function)
在https://rvm.io/packages/openssl/上,它表示要执行$ rvm requirements
,但会出错:
$ rvm requirements
ERROR: Unrecognized command line argument: 'requirements' ( see: 'rvm usage' )
在同一页面上,它要求执行$ rvm reinstall 1.9.2 --with-openssl-dir=/usr/local
,但这会在ruby的编译过程中给出相同的错误。对于同一页面上的第二种方法,执行rvm pkg install openssl
会给我
$ rvm pkg install openssl
ERROR: Unrecognized command line argument: 'pkg' ( see: 'rvm usage' )
显然安装了Openssl:
$ dpkg --get-selections | grep openssl
openssl install
python-openssl install
答案 0 :(得分:4)
您正在运行过时的RVM版本。您应该使用http://rvm.io中说明的建议安装路径,并且不要使用软件包安装程序。要修复此指令,请https://stackoverflow.com/a/9056395/497756。
另外不要使用1.9.2而是使用当前的1.9.3 ruby,而对于新项目使用的是RC1中的2.0.0,应尽快发布。
答案 1 :(得分:1)
如果您使用ubuntu,只需使用此ppa中的ruby ..
http://blog.brightbox.co.uk/posts/next-generation-ruby-packages-for-ubuntu