【问题标题】:Can't install Ruby 1.9.3 via rvm in OS X Lion even with "--with-gcc=clang"即使使用“--with-gcc=clang”,也无法在 OS X Lion 中通过 rvm 安装 Ruby 1.9.3
【发布时间】:2013-03-23 13:28:23
【问题描述】:

我一直在这里检查其他问题,来自人们在使用 RVM 在 Lion 中安装 ruby​​ 1.9.3 时遇到问题,问题似乎与我相同,所以我尝试了提供的解决方案,但没有成功:

我第一次尝试: rvm install 1.9.3 --with-gcc=clang

返回: Installing requirements for osx/10.7/x86_64, might require sudo password. Skipping `brew update` make sure your formulas are up to date. Missing required packages: libtool, pkg-config, libyaml, readline, libxml2, libxslt, openssl, sqlite. requirements_brew_generate_openssl_cert:4: no such file or directory: /usr/local/Cellar/openssl/1.0.1e/bin/openssl Skipping update of certificates in '/cert.pem'. Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms. Installing Ruby from source to: /Users/****/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)... ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection... ruby-1.9.3-p392 - #extracted to /Users/****/.rvm/src/ruby-1.9.3-p392 (already extracted) ruby-1.9.3-p392 - #configuring................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ruby-1.9.3-p392 - #compiling................ ruby-1.9.3-p392 - #installing .............. ruby-1.9.3-p392 is not installed. To install do: 'rvm install ruby-1.9.3-p392'

注意ruby-1.9.3-p392 is not installed. 是如何接近结尾的。

我后来尝试按照以下建议进行操作: CC=/usr/bin/gcc-4.2 rvm install 1.9.3 --enable-shared

但它返回: You requested building with '/usr/bin/gcc-4.2' but it is not in your path.

所以我基本上被困在这里,不知道如何继续。任何帮助将不胜感激。提前致谢。

【问题讨论】:

    标签: osx-lion rvm ruby-1.9.3


    【解决方案1】:

    这应该解决它:

    rvm get head
    rvm install 1.9.3 --autolibs=4
    

    【讨论】:

    • 非常感谢先生。你能解释一下“--autolibs=4”的作用吗?我只是好奇我刚刚做了什么:P
    • 这里是描述 => bit.ly/rvm-autolibs - 我将用这张票使这些标志更具描述性,当前状态有变化 - 大部分当前状态 4 将被删除并插入新状态 2,但是 4 是你的最大努力
    • 使用这些命令,我​​得到: 搜索二进制红宝石,这可能需要一些时间。没有可用的二进制红宝石:osx/10.8/x86_64/ruby-1.9.3-p392。继续编译。请阅读“rvm mount”以获取有关二进制红宝石的更多信息。 osx 的安装要求,可能需要 sudo 密码。 /Users/alex/.rvm/scripts/functions/build_requirements:第 28 行:跳过 brew update 确保您的公式是最新的。:找不到命令
    • 这是一个bug,在rvm get head之后修复了
    • 在 rvm get head 和 --autolibs=4 之后,我仍然会发生这种情况(与 Alex Neth 完全相同)
    【解决方案2】:

    安装失败,因为 Homebrew 维护的某些软件包需要更新。在代码的第二行“跳过 brew update 确保您的公式是最新的。”

    brew update
    

    可能需要

    sudo brew update
    

    然后

    rvm install 1.9.3 --with-gcc=clang
    

    应该覆盖 rvm 允许您下载 ruby​​ 1.9.3 的稳定版本

    sudo rvm install 1.9.3 --with-gcc=clang
    

    也可以。

    【讨论】:

      猜你喜欢
      • 2013-10-31
      • 1970-01-01
      • 2011-12-23
      • 2011-12-29
      • 2012-02-15
      • 2011-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多