开发者

"rvm install ree" fails on ubuntu: how to get pass openssl and zlib dev headers requirement?

开发者 https://www.devze.com 2023-04-01 22:26 出处:网络
I want to install Ruby Entreprise Edition via rvm on Ubuntu. I\'m running the following: $ rvm install ree --with-readline-dir=/home/ubuntu/.rvm/usr --with-iconv-dir=/home/ubuntu/.rvm/usr --with-zlib

I want to install Ruby Entreprise Edition via rvm on Ubuntu. I'm running the following:

$ 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

However, it fails with the following error:

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)开发者_C百科
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.

The file /home/ubuntu/.rvm/log/ree-1.8.7-2011.03/install.log says the following:

 * 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

However I do have openssl, readline, and zlib-devel installed both as rvm package and via apt-get on the system.

$ rvm package install ree_dependencies

Please help!


If you use rvm version 1.9.0,

$ rvm package install ree_dependencies ERROR: Unrecognized command line argument: 'package' ( see: 'rvm usage' )

Using

$ rvm pkg install ree_dependencies

will work


It may be slightly different depending on which version of Ubuntu you are rocking, but an apt-get install libssl-dev libreadline-dev should get those headers installed.


Actually, the problem was that I was under "rvm jruby-1.6.2" when running install. It seems like when you are under jruby some scripts get messed up. So this is my solution:

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号