【问题标题】:Can't install Ruby 1.9.3 on Mountain Lion with rvm; Homebrew can't find libksba library无法使用 rvm 在 Mountain Lion 上安装 Ruby 1.9.3; Homebrew 找不到 libksba 库
【发布时间】:2012-12-16 08:26:39
【问题描述】:

我无法让 rvm 安装 Ruby 1.9.3;即使已经下载并安装了 Homebrew 库“libksba”,它也会继续询问。当我运行“brew list”命令时,它会清楚地显示出来。

我也安装了 Xcode 4.5。

这是环境变量配置问题,我需要配置路径,让他们可以看到对方?如果是,我该如何配置?

Homebrew 和 rvm 如何协同工作?这个我不是很清楚。

谢谢。

rvm install 1.9.3






















Ruby (and needed base gems) for your selection will be installed shortly.
Before it happens, please read and execute the instructions below.
Please use a separate terminal to execute any additional commands.

  Notes for Mac OS X 10.8.2, Xcode 4.5.2.

For JRuby:  Install the JDK. See http://developer.apple.com/java/download/  # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See http://nodejs.org/download/

To use an RVM installed Ruby as default, instead of the system ruby:

    rvm install 1.8.7 # installs patch 357: closest supported version
    rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
    rvm alias create default 1.8.7

And reopen your terminal windows.

Xcode and gcc:

:

'brew list' 命令输出

brew list
apple-gcc42 automake    libgpg-error    libxml2
autoconf    git     libksba     libxslt

最近的会话:

brew 升级 libksba 错误:已安装 libksba-1.2.0 $酿造更新 将 Homebrew 从 5909e2c6 更新到 0e0ef31f。 ==> 新公式 globus 工具包 postgres-xc ==> 更新公式 casperjs cunit dxflib mysql-cluster smake cdrtools dvdrtools ivy shmcat webalizer ==> 已删除的公式 转码 unknown7cd1c3e98b07:~ pdenlinger$ rvm install 1.9.3

供您选择的 Ruby(和所需的基础 gem)将很快安装。 在它发生之前,请阅读并执行以下说明。 请使用单独的终端执行任何其他命令。

Mac OS X 10.8.2、Xcode 4.5.2 的注意事项。

对于 JRuby:安装 JDK。请参阅http://developer.apple.com/java/download/ # 当前 Java 版本“1.6.0_26” 对于 IronRuby:安装 Mono >= 2.6 对于 Ruby 1.9.3:安装 libksba # 如果使用 Homebrew,则 'brew install libksba' 对于 Opal:使用 NPM 安装 Nodejs。见http://nodejs.org/download/

要使用 RVM 安装的 Ruby 作为默认值,而不是系统 ruby​​:

rvm install 1.8.7 # installs patch 357: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
rvm alias create default 1.8.7

然后重新打开您的终端窗口。

Xcode 和 gcc:

添加了 C 编译器错误:

rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p362.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p362, this may take a while depending on your cpu(s)...
ruby-1.9.3-p362 - #downloading ruby-1.9.3-p362, this may take a while depending on your connection...
ruby-1.9.3-p362 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p362 (already extracted)
ruby-1.9.3-p362 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
There has been an error while running configure. Halting the installation.
$ cat /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
[2013-01-01 20:20:35] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.

环境变量标志:

$ brew update
Already up-to-date.
$ brew tap homebrew/dupes
Error: Already tapped!
$ brew install autoconf automake apple-gcc42
Error: autoconf-2.69 already installed
Error: automake-1.12.6 already installed
Error: apple-gcc42-4.2.1-5666.3 already installed
$ rvm pkg install openssl
Fetching openssl-1.0.1c.tar.gz to /usr/local/rvm/archives
Extracting openssl to /usr/local/rvm/src/openssl-1.0.1c
Configuring openssl in /usr/local/rvm/src/openssl-1.0.1c.
Compiling openssl in /usr/local/rvm/src/openssl-1.0.1c.
Installing openssl to /usr/local/rvm/usr

Please note that it's required to reinstall all rubies:

    rvm reinstall all --force

Updating openssl certificates
$ rvm reinstall all --force
$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p362.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p362, this may take a while depending on your cpu(s)...
ruby-1.9.3-p362 - #downloading ruby-1.9.3-p362, this may take a while depending on your connection...
ruby-1.9.3-p362 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p362 (already extracted)
ruby-1.9.3-p362 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
There has been an error while running configure. Halting the installation.
unknown7cd1c3e98b07:~ pdenlinger$ cat /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
[2013-01-02 09:58:08] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
$ cat config.log
cat: config.log: No such file or directory
$ 

【问题讨论】:

  • rvm 问你怎么样?你能显示输出吗?
  • 是的,我在上面的编辑中粘贴了 rvm 和 brew 命令的输出。谢谢。
  • brew update && brew upgrade libksba 也许?
  • 运行“brew update”和“brew upgrade libksba”。显示 libksba 正在 1.2.0(当前版本)上运行。

标签: ruby rvm osx-mountain-lion homebrew


【解决方案1】:

您看到的是rvm requirements 的输出,它使用less 显示=> 使用向上/向下箭头导航,q 退出并继续安装。

这些要求仅在您第一次安装 ruby​​ 时显示。

这是一个错误,损坏的代码已经修复https://github.com/wayneeseguin/rvm/commit/848ef50f1b32c87e853f21e801f167a39e8c9c66

【讨论】:

  • 如何解决这个问题?输入“rvm install ruby​​-1.9.3-p362”命令,它仍然显示 rvm 要求。我仍在使用 Mac 的系统 ruby​​ (1.8.7),无法安装 1.9.3。非常令人沮丧。谢谢。
  • 从更新 RVM rvm get head 开始,然后确保您阅读了我的说明以使用键盘箭头进行导航,并通过 q 退出 less 程序。
  • 谢谢。按照您的指示,使用 q 退出,添加“rvm install 1.9.3”命令,然后收到 C 编译器无法编译可执行文件的错误消息。详细的错误消息添加到上面的编辑中。
  • 您错过了第一次阅读整个指令(使用箭头),它解释了正确编译器的要求以及如何获取它。
  • 我通过了较少的外壳并尝试使用箭头,但它没有显示任何动作。也许我不知道如何使用它,但这对我来说毫无意义。我已按照有关使用 brew、安装 SSL 的所有说明进行操作,但仍然无法正常工作。由于我不在 rvm 团队中,所以我无法理解发生了什么。我在哪里可以获得连我都能理解的简单英语的说明?
猜你喜欢
  • 2012-12-12
  • 1970-01-01
  • 2013-03-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-12-11
  • 2013-04-13
  • 2012-10-07
相关资源
最近更新 更多