pde*_*ger 2 ruby homebrew rvm osx-mountain-lion
尝试使用rvm在Mountain Lion上安装Ruby,但收到此错误消息:
ruby-1.9.3-p362 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p362
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.
ruby-1.9.3-p362 is not installed.
Creating alias default for ruby-1.9.3-p362.
Recording alias default for ruby-1.9.3-p362.
Creating default links/files
ruby-1.9.3-p362 is not installed.
Could not load ruby ruby-1.9.3-p362.
/usr/local/rvm/scripts/alias: line 111: /usr/local/rvm/rubies/ruby-1.9.3-p362/bin/ruby: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我该怎么做才能正确安装Ruby?还安装了Homebrew包管理器; 有冲突吗?
提前致谢.
JDR*_*no2 12
这可能是由于最新版本的OS X使用LLVM而不是默认为GCC编译器.
试试这个:
brew update
brew tap homebrew/dupes
brew install apple-gcc42
Run Code Online (Sandbox Code Playgroud)
安装GCC编译器.然后:
rvm install 1.9.3 --with-gcc=clang`
Run Code Online (Sandbox Code Playgroud)
编辑:
如果以前的解决方案不起作用,请尝试在运行之前尝试以下方法rvm install 1.9.3:
export CC=/usr/local/bin/gcc-4.2
编辑2: 以下github页面概述了问题和多个解决方案,添加到本文中以用于文档目的:OSX 10.8 Mountain Lion上的RVM/Ruby安装提示
| 归档时间: |
|
| 查看次数: |
6227 次 |
| 最近记录: |