Pregunta

I am trying to install Ruby 2.0.0-rc1, but got error of OpenSSL.

System Env: OS:MacOS 10.8.2 Mountain Lion Compile ENV:Xcode CommandTools 4.6 xcode46cltools_10_86938131a.dmg

RVM Installment:

rvm get head
brew install openssl
rvm reinstall 2.0.0 --with-openssl-dir=`brew --prefix openssl`

And I tried RVM pkg:

rvm pkg install openssl
rvm reinstall 2.0.0 --with-openssl-dir=$HOME/.rvm/usr

But got same error when I run bundle:

https://gist.github.com/4704589

Notice that it is not a certification error. I searched Google a lot, but nobody got the same error.


And now my rvm use system broke too:

─(⚡refactory/test_for_git_server)─( ̄▽ ̄)~*>rvm use system
Now using system ruby.
─(⚡refactory/test_for_git_server)─( ̄▽ ̄)~*>which ruby
/Users/ranmocy/.rvm/rubies/ruby-2.0.0-rc1/bin/ruby

rbenv got error too:

https://gist.github.com/4704619


But when I compile ruby 2.0.0-rc1 from source by hand, there is no problem at all.

Any help?

¿Fue útil?

Solución

Oh, I had a similar problem today, and was taught a bit about pkg-config, the wonderful system that describes installation of libraries. As a way of paying back that explanation, I wrote about it.

TL;DR

Add this to your shell startup file (such as ~/.bash_profile or ~/.zshrc). Then run the installation again.

export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/lib/pkgconfig

This makes the OpenSSL that isn't broken be found by configure scripts.

Otros consejos

That's how I managed to compile ruby2 with rvm and MacOSX 10.8

export CC=/usr/bin/gcc
rvm pkg install openssl
rvm install ruby-head --with-gcc=clang --verify-downloads 1  # see *
rvm use ruby-head
ruby -v
# => ruby 2.0.0dev (2013-02-24) [x86_64-darwin12.2.0]

More comments at: https://gist.github.com/iboard/5023717

this looks like clang problem, see my other answer describing the problem - https://stackoverflow.com/a/14594287/497756

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top