gpt4 book ai didi

ruby - 狮子 : Problem with RVM installing rubies - problem related to openssl

转载 作者:数据小太阳 更新时间:2023-10-29 07:21:49 25 4
gpt4 key购买 nike

我很绝望,现在已经两天(!!)天都没有解决方案来解决以下问题。

更新 Lion 后,我想使用最新版本的 rvm 安装额外的 rubies。

这是我之后调用 bundler 时发生的情况:

/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 中的 header 。检查。

我决定用 brew 安装更新的版本。之后没有 ruby​​ 编译错误 BN_rand_range 和 BN_peudo_rand_range 已经被定义。

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

所以我删除了之前放在那里的 openssl 头文件 bn.h 中的注释并尝试了相反的操作。我在 ~/.rvm/src/ruby-1.9.2-p290/ext/openssl/openssl_missing.h 中评论了这些行

同样的结果。

之后我完全删除了 ~/.rvm,重新安装它并且......遇到了同样的问题。

现在我尝试了:

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

同样的结果。

我很绝望。谁能帮忙?问候菲利克斯

最佳答案

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

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

rvm pkg install openssl

然后在 ruby​​ 安装期间告诉 rvm 链接到那个版本:

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

如果您已经有本地安装,请替换为:

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

不要尝试经常阅读的内容:

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

那行不通。

关于ruby - 狮子 : Problem with RVM installing rubies - problem related to openssl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7533163/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com