Lion:RVM安装红宝石的问题-与openssl有关的问题 [英] Lion: Problem with RVM installing rubies - problem related to openssl

查看:99
本文介绍了Lion:RVM安装红宝石的问题-与openssl有关的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很绝望,现在困惑了两(!!)天而又没有解决方案.

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

在更新Lion之后,我想使用最新版本的rvm安装其他红宝石.

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)

好,openssl问题.所以我检查了没有openssl,但是在/usr中有系统,在/usr/lib中有库,在/usr/include/openssl中有标头.检查.

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.

我决定在brew中安装一个更新的版本.此后,没有任何红宝石编译,并且已经定义了BN_rand_range和BN_peudo_rand_range的错误.

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.

似乎是对最新gcc的类型检查进行更严格的类型检查,因此我未注释/usr/include/openssl/bn.h中的411和412行,这引起了冲突,而ruby自行定义了两者.现在,ruby可以编译,但是我收到相同的错误,找不到符号:_SHA1_Init.

Seems to be more strict type checking of the most recent gcc, 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.

因此,我从之前放入的openssl头文件bn.h中删除了注释,然后尝试了相反的操作.我在〜/.rvm/src/ruby​​-1.9.2-p290/ext/openssl/openssl_missing.h

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

结果相同.

之后,我完全删除了〜/.rvm,重新安装它并...出现了相同的问题.

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

现在我尝试:

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

结果相同.

我很绝望.有人可以帮忙吗? 问候 费利克斯

I'm desparate. Can anyone help? Regards Felix

推荐答案

对于任何曾经在Lion上遇到此问题的人来说……这是一些来自openssl的重复标头的问题.您可以简单地在本地安装openssl并告诉rvm使用该本地openssl版本.

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.

您可以使用前缀/usr/local手工编译opnessl或简单地让rvm来完成这项工作:

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

rvm pkg install openssl

然后在Ruby安装过程中告诉rvm链接到该版本:

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

那行不通.

这篇关于Lion:RVM安装红宝石的问题-与openssl有关的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆