Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing ruby-2.0.0-p0 with rbenv BUILD FAILED

So I tried to install ruby through rbenv on my new ubuntu 12.04LTS running on VirtualBox.

I got rbenv from https://github.com/sstephenson/rbenv and ruby-build from https://github.com/sstephenson/ruby-build.

and then i run the following but build fails :(

rbenv install 2.0.0-p0
Downloading ruby-2.0.0-p0.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
Installing ruby-2.0.0-p0...

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20130506102349.2564
Results logged to /tmp/ruby-build.20130506102349.2564.log

Last 10 log lines:
installing default gems:      /home/shivin/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0     (build_info, cache, doc, gems, specifications)
                          bigdecimal 1.2.0
                          io-console 0.4.2
                          json 1.7.7
                          minitest 4.3.2
                          psych 2.0.0
                          rake 0.9.6
                          rdoc 4.0.0
                          test-unit 2.0.0.0
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

Any help would be appreciated. Let me know if you need any more details. Thanks!

like image 980
ShivvyBee Avatar asked May 06 '13 17:05

ShivvyBee


2 Answers

You are going to need libssl-dev. For best results install all of the requirements which rvm autolibs function will install for you. Some of them (like sqlite3) presume that you will ultimately be wanting to install Rails, but aren't harmful if you don't need them.

like image 86
Sam Ruby Avatar answered Oct 04 '22 19:10

Sam Ruby


Most probably you need the openssl extension as a prerequisite :

sudo apt-get install openssl

should to the trick. Relaunch your RBENV install afterwards.

like image 44
Martin Avatar answered Oct 04 '22 19:10

Martin