【问题标题】:Upgrading to Ruby 2.1.3 on Mac OSx 10.9.5在 Mac OSx 10.9.5 上升级到 Ruby 2.1.3
【发布时间】:2014-10-03 17:27:50
【问题描述】:

今天我在 Mac OSx 10.9.5 上从 2.0.0 升级到 Ruby 2.1.3。事实证明,这比最初预期的要困难得多。而且由于我浪费了很多时间,我想我会分享我的经验和解决方案,以防其他人也遇到问题。

我安装了 xcode + 开发者工具。我这周也更新了 xcode - 不确定这是否是事情突然不起作用的原因。然而,事实是这样的:

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

$ rvm -v
rvm 1.25.32 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

$ brew -v
Homebrew 0.9.5

$ git version
git version 1.9.3 (Apple Git-50)

获取最新版本的 Ruby 并默认使用它:

$ rvm install ruby
$ rvm --default use ruby-2.1.3

现在的问题是,如果我尝试检查 ruby​​ 版本,我会得到以下结果:

$ rvm --default use ruby-2.1.3
Using /Users/georg/.rvm/gems/ruby-2.1.3
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
  Referenced from: /Users/georg/.rvm/rubies/ruby-2.1.3/bin/ruby
  Reason: image not found

事实上,没有什么真正起作用 - 我尝试重新加载 RVM、重新安装、重新安装和升级自制软件等。

$ brew update && brew upgrade

$ rvm reload

重新安装红宝石

$ rvm install ruby-2.1.3
Already installed ruby-2.1.3.
To reinstall use:

    rvm reinstall ruby-2.1.3

还有许多其他解决方案 - 然而,这一切都没有奏效。

所以我检查了我是否有 /usr/local/lib/libcloog-isl.4.dylib

$ ls -la /usr/local/lib/libcloog-isl.4.dylib 

没有回馈任何东西......

【问题讨论】:

  • rvmrbenv 之类的东西使整个过程更加容易。

标签: ruby macos installation


【解决方案1】:

因此,解决问题的解决方案是运行以​​下命令:

$ brew rm cloog; brew install cloog 

Ta-Ta。这一切都突然发生了!

$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]

【讨论】:

  • 谢谢,这实际上也对我有用。我遇到了同样的问题。然而,是什么让你想到了“clolog”?
【解决方案2】:

这是 RVM 安装的 Ruby 2.1.3 二进制版本的一个已知问题。 RVM 的维护者 Michal Papis 目前还没有将修复这个问题放在他的优先级列表的首位。正确的解决方案是重新安装没有二进制文件的 Ruby 2.1.3,如下所示:

rvm reinstall 2.1.3 --disable-binary

查看这些 RVM GitHub 问题以查看 Michal 关于此问题的 cmets: https://github.com/wayneeseguin/rvm/issues/3068

https://github.com/wayneeseguin/rvm/issues/3094

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-30
    • 1970-01-01
    • 2016-11-03
    • 1970-01-01
    • 1970-01-01
    • 2015-04-23
    • 2015-08-01
    • 1970-01-01
    相关资源
    最近更新 更多