【发布时间】:2013-01-19 09:16:30
【问题描述】:
我正在尝试在 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
【问题讨论】:
-
不要不要不要用包管理器安装 rvm,使用提供的安装程序脚本。请参阅 ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you 以获得有关执行此操作的好教程。
标签: ruby ubuntu compilation openssl rvm