【问题标题】:Ruby 2.0 cannot extract source on OS XRuby 2.0 无法在 OS X 上提取源代码
【发布时间】:2013-03-27 21:24:47
【问题描述】:

我正在尝试使用以下步骤在我的 Mac OS X 10.8 上安装 Ruby 2.0 http://www.interworks.com/blogs/ckaukis/2013/03/05/installing-ruby-200-rvm-and-homebrew-mac-os-x-108-mountain-lion

所有步骤都成功完成,直到最后。跑完之后

rvm install 2.0.0

它给了我以下输出:

/Users/aaron/.rvm/src/ruby-2.0.0-p0 has already been removed.
/Users/aaron/.rvm/rubies/ruby-2.0.0-p0 has already been removed.
Searching for binary rubies, this might take some time. No binary
rubies available for: osx/10.8/x86_64/ruby-2.0.0-p0. Continuing with
compilation. Please read 'rvm mount' to get more information on binary
rubies. Installing requirements for osx, might require sudo password.
Already up-to-date. Certificates in '/usr/local/etc/openssl/cert.pem'
already are up to date. Installing Ruby from source to:
/Users/aaron/.rvm/rubies/ruby-2.0.0-p0, this may take a while
depending on your cpu(s)... ruby-2.0.0-p0 - #downloading
ruby-2.0.0-p0, this may take a while depending on your connection...
tee: /Users/aaron/.rvm/log/ruby-2.0.0-p0/extract.log: Permission
denied tee: /Users/aaron/.rvm/log/ruby-2.0.0-p0/extract.log:
Permission denied ruby-2.0.0-p0 - #extracting ruby-2.0.0-p0 to
/Users/aaron/.rvm/src/ruby-2.0.0-p0 Error running
'__rvm_package_extract
/Users/aaron/.rvm/archives/ruby-2.0.0-p0.tar.bz2
/Users/aaron/.rvm/tmp/rvm_src_856', please read
/Users/aaron/.rvm/log/ruby-2.0.0-p0/extract.log There has been an
error while trying to extract the source. Halting the installation.
There has been an error fetching the ruby interpreter.  Halting the
installation.

看起来它无法提取源。有什么建议可以让我正常工作吗? 提前致谢。

【问题讨论】:

  • 我使用bash而不是zsh解决了这个问题。

标签: ruby macos rvm


【解决方案1】:

您可能有权限问题,请尝试:

sudo chown -R $USER: $rvm_path

【讨论】:

  • 我想你明白了!我运行了该命令,然后重新运行了 rvm install,这次它编译并安装了。但是,当它进入“为 ruby​​-2.0.0-p0 安装 ruby​​gems-2.0.3”时,它给了我一个错误“运行时出错 'env GEM_PATH=/Users/aaron/.rvm/gems/ruby-2.0.0- p0: ..... ruby​​gems 的安装没有成功完成。”知道为什么 ruby​​gems 无法安装吗?我需要单独做吗?感谢您的帮助,非常感谢。
  • 最后说,“请阅读 /Users/aaron/.rvm/log/ruby-2.0.0-p0/rubygems.install.log” 如果它是文件的链接帮助:bit.ly/YJG3KF
  • 问题是已知的,它是 ruby​​gems --verbose 标志触发了一个 ruby​​ 错误 bugs.ruby-lang.org/issues/7992 它不应该对 ruby​​gems 有害并且应该按预期工作 - 如果没有,请告诉我。跨度>
【解决方案2】:

尝试rvm get head 并再次运行安装

【讨论】:

  • 我做了两个 rvm get head 然后 rvm install 2.0.0 并且它给了我相同的结果
  • /Users/aaron/.rvm/log/ruby-2.0.0-p0/extract.log 里面有什么?
  • 奇怪的东西..好像没有文件。 cat: /Users/aaron/.rvm/log/ruby-2.0.0-p0/extract.log: 没有这样的文件或目录
【解决方案3】:

这是一个已知问题。确保您拥有来自 https://developer.apple.com/downloads 的最新命令行工具并运行 rvm install ruby​​ --with-gcc=clang

我基本上只是重复here的答案

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-04-02
    • 1970-01-01
    • 2013-06-15
    • 1970-01-01
    • 1970-01-01
    • 2014-04-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多