我可以将rvm链接到brew吗?

时间:2015-03-07 16:05:16

标签: ruby rvm homebrew osx-yosemite

我无法在OS X Yosemite上使用rvm安装ruby 2.2.1,但是,使用brew很容易安装。

问题是,如何让rvm使用使用brew安装的ruby 2.2.1?

使用brew安装红宝石很容易:

Apples-iMac:ruby-2.2.1 Apple$ brew install ruby
==> Downloading https://homebrew.bintray.com/bottles/ruby-2.2.1.yosemite.bottle.
######################################################################## 100.0%
==> Pouring ruby-2.2.1.yosemite.bottle.tar.gz
  /usr/local/Cellar/ruby/2.2.1: 1080 files,  21M

但是在rvm:

Apple$ rvm install ruby 2.2.1
ruby-2.2.1 - #removing src/ruby-2.2.1..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-2.2.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx_brew.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/Apple/.rvm/rubies/ruby-2.2.1, this may take a while depending on your cpu(s)...
ruby-2.2.1 - #downloading ruby-2.2.1, this may take a while depending on your connection...
ruby-2.2.1 - #extracting ruby-2.2.1 to /Users/Apple/.rvm/src/ruby-2.2.1....
ruby-2.2.1 - #configuring..
Error running './configure --prefix=/Users/Apple/.rvm/rubies/ruby-2.2.1 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --disable-install-doc --enable-shared',
showing last 15 lines of /Users/Apple/.rvm/log/1425744075_ruby-2.2.1/configure.log
current path: /Users/Apple/.rvm/src/ruby-2.2.1
GEM_HOME=/Users/Apple/.rvm/gems/ruby-2.1.5
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/Apple/.rvm/gems/ruby-2.1.5/bin:/Users/Apple/.rvm/gems/ruby-2.1.5@global/bin:/Users/Apple/.rvm/rubies/ruby-2.1.5/bin:/Users/Apple/.rvm/bin:/opt/local/bin:/opt/local/sbin:/usr/local/php5/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/Cellar/imagemagick/6.8.9-8/lib/pkgconfig:/usr/local/Cellar/imagemagick/6.8.9-8/include/ImageMagick-6/wand:/opt/X11/bin:PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.9-8/lib/pkgconfig/magick/6.8.9
GEM_PATH=/Users/Apple/.rvm/gems/ruby-2.1.5:/Users/Apple/.rvm/gems/ruby-2.1.5@global
command(5): ./configure --prefix=/Users/Apple/.rvm/rubies/ruby-2.2.1 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --disable-install-doc --enable-shared
config.guess already exists
config.sub already exists
checking build system type... x86_64-apple-darwin14.1.0
checking host system type... x86_64-apple-darwin14.1.0
checking target system type... x86_64-apple-darwin14.1.0
couldn't understand kern.osversion `14.1.0'
checking whether the C compiler works... no
configure: error: in `/Users/Apple/.rvm/src/ruby-2.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
There has been an error while running configure. Halting the installation.

那么,是否可以充分利用brew和rvm?

0 个答案:

没有答案