开发者

Lion: Problem with RVM installing rubies - problem related to openssl

开发者 https://www.devze.com 2023-04-06 20:42 出处:网络
I\'m desparate, fuddling with the following problem for two(!!) days now w/o a solution. After an update to Lion I wanted to install additional rubies using the most recent version of rvm.

I'm desparate, fuddling with the following problem for two(!!) days now w/o a solution.

After an update to Lion I wanted to install additional rubies using the most recent version of rvm.

Here's what happens when I call bundler afterwards:

/Users/felix/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/janroesner/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.1.0/digest/sha1.bundle, 9): Symbol not found: _SHA1_Init (LoadError)

Ok, openssl problem. So I checked there is no openssl but the system one in /usr with libraries in /usr/lib and headers in /usr/include/openssl. Check.

I decided to install a more recent version with brew. After that no ruby compiles with the error that BN_rand_range and BN_peudo_rand_range are defined already.

Seems to be more strict type checking of the most recent g开发者_运维技巧cc, so I uncommented lines 411 and 412 in /usr/include/openssl/bn.h that caused the conflict cause ruby defines both on it's own. Now ruby compiles but I receive the same error Symbol not found: _SHA1_Init.

So I removed the comments from the openssl header file bn.h I put there before and tried the opposite. I commented these lines out in ~/.rvm/src/ruby-1.9.2-p290/ext/openssl/openssl_missing.h

Same result.

After that I completely removed ~/.rvm, reinstalled it and ... have the same problem.

Now I tried:

rvm pkg install openssl
rvm remove 1.9.2-p290
rvm install 1.9.2-p290 -C --with-openssl-dir=$rvm_path/usr

Same result.

I'm desparate. Can anyone help? Regards Felix


For anyone who should ever have this problem on Lion ... it's some Problem with duplicate headers that come from openssl. You can simply install openssl locally and tell rvm to use that local openssl version.

You can compile opnessl by hand with the prefix /usr/local or simply let rvm do the job:

rvm pkg install openssl

And then tell rvm to link against that version during ruby install:

rvm install 1.9.2 --with-openssl-dir=/path/to/your/home/.rvm/usr

In case you already have a local installation replace with:

rvm install 1.9.2 --with-openssl-dir=/usr/local

DO NOT try what can be read often:

rvm install 1.9.2 -C --with-openssl-dir=/path/to/your/home/.rvm/usr

That does not work.


I just went through this tutorial and it worked without any problems: Getting Rails Up: http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/

0

精彩评论

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

关注公众号