“rvm install ree”在ubuntu上失败:如何获得传递openssl和zlib dev头文件的要求?

时间:2011-09-02 23:02:28

标签: ruby ubuntu rvm

我想在Ubuntu上通过rvm安装Ruby Entreprise Edition。 我正在运行以下内容:

$ rvm install ree --with-readline-dir=/home/ubuntu/.rvm/usr --with-iconv-dir=/home/ubuntu/.rvm/usr --with-zlib-dir=/home/ubuntu/.rvm/usr --with-openssl-dir=/home/ubuntu/.rvm/usr

但是,它失败并出现以下错误:

Installing Ruby Enterprise Edition from source to: /home/ubuntu/.rvm/rubies/ree-1.8.7-2011.03
ree-1.8.7-2011.03 - #fetching (ruby-enterprise-1.8.7-2011.03)
ree-1.8.7-2011.03 - #extracting ruby-enterprise-1.8.7-2011.03 to /home/ubuntu/.rvm/src/ree-1.8.7-2011.03
ree-1.8.7-2011.03 - #installing 
ERROR: Error running './installer -a /home/ubuntu/.rvm/rubies/ree-1.8.7-2011.03  --dont-install-useful-gems ', please read /home/ubuntu/.rvm/log/ree-1.8.7-2011.03/install.log
ERROR: There has been an error while trying to run the ree installer. Halting the installation.

文件/home/ubuntu/.rvm/log/ree-1.8.7-2011.03/install.log说明如下:

 * C compiler... found at /usr/bin/gcc
 * C++ compiler... found at /usr/bin/g++
 * The 'make' tool... found at /usr/bin/make
 * The 'patch' tool... found at /usr/bin/patch
 * Zlib development headers... found
 * OpenSSL development headers... not found
 * GNU Readline development headers... not found

Some required software is not installed.
But don't worry, this installer will tell you how to install them.
Press Enter to continue, or Ctrl-C to abort.
--------------------------------------------
Installation instructions for required software

 * To install OpenSSL development headers:
   Please download it from http://www.openssl.org/

 * To install GNU Readline development headers:
   Please download it from http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html

但是我确实将openssl,readline和zlib-devel作为rvm软件包安装并通过apt-get安装在系统上。

$ rvm package install ree_dependencies

请帮忙!

3 个答案:

答案 0 :(得分:6)

如果您使用rvm版本1.9.0,

$ rvm package install ree_dependencies 错误:无法识别的命令行参数:'package'(请参阅:'rvm usage')

使用

$ rvm pkg install ree_dependencies

将起作用

答案 1 :(得分:5)

根据您正在摇摆的Ubuntu版本可能略有不同,但apt-get install libssl-dev libreadline-dev应安装这些标头。

答案 2 :(得分:5)

实际上,问题是我在运行安装时遇到了“rvm jruby-1.6.2”。看起来当你在jruby之下时,一些脚本会搞砸。 所以这是我的解决方案:

rvm use system
rvm package install ree_dependencies
rvm install ree --with-readline-dir=/home/ubuntu/.rvm/usr  \
                --with-iconv-dir=/home/ubuntu/.rvm/usr     \
                --with-zlib-dir=/home/ubuntu/.rvm/usr      \
                --with-openssl-dir=/home/ubuntu/.rvm/usr