首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在带有rvm的Mountain Lion上安装Ruby 1.9.3;Homebrew找不到libksba库

无法在带有rvm的Mountain Lion上安装Ruby 1.9.3;Homebrew找不到libksba库
EN

Stack Overflow用户
提问于 2013-01-02 04:51:43
回答 1查看 3K关注 0票数 2

我无法让rvm安装Ruby 1.9.3;它一直要求安装Homebrew库'libksba‘,尽管它已经下载并安装了。当我运行'brew list‘命令时,它会清晰地显示出来。

我也安装了Xcode4.5。

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

Homebrew和rvm如何协同工作?我不太清楚这一点。

谢谢。

代码语言:javascript
复制
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’命令输出

代码语言:javascript
复制
brew list
apple-gcc42 automake    libgpg-error    libxml2
autoconf    git     libksba     libxslt

最近的会话:

brew升级libksba错误: libksba-1.2.0已安装$ brew更新将Homebrew从5909e2c6更新为0e0ef31f。==>新公式globus-toolkit postgres-xc ==>更新公式casperjs cunit dxflib mysql-cluster smake cdrtools dvdrtools常春藤shmcat webalizer ==>已删除公式转码未知7cd1c3e98b07:~ 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“For IronRuby: Install MonoNodejs2.6 For IronRuby 1.9.3: Install libksba # If using Homebrew,'brew Install libksba‘For Opal: install Nodejs with NPM。请参阅http://nodejs.org/download/

要默认使用安装了Ruby的RVM,而不使用系统ruby,请执行以下操作:

代码语言:javascript
复制
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编译器错误:

代码语言:javascript
复制
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.

环境变量标志:

代码语言:javascript
复制
$ 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
$ 
EN

回答 1

Stack Overflow用户

发布于 2013-01-02 07:39:07

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

只有在您第一次安装ruby时才会显示这些要求。

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

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14114116

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档