我正在尝试在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