Ruby on rails 使用RVM安装Ruby时出错(OSX 10.8)
尝试使用RVM安装Ruby 1.9.3(RVM安装Ruby 1.9.3)时,出现以下错误:Ruby on rails 使用RVM安装Ruby时出错(OSX 10.8),ruby-on-rails,ruby,rvm,Ruby On Rails,Ruby,Rvm,尝试使用RVM安装Ruby 1.9.3(RVM安装Ruby 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 bi
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.
Fetching yaml-0.1.4.tar.gz to /Users/christiaan/.rvm/archives
Extracting yaml to /Users/christiaan/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/christiaan/.rvm/src/yaml-0.1.4.
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --prefix=/Users/christiaan/.rvm/usr', please read /Users/christiaan/.rvm/log/ruby-1.9.3-p362/yaml/configure.log
Compiling yaml in /Users/christiaan/.rvm/src/yaml-0.1.4.
Error running 'make', please read /Users/christiaan/.rvm/log/ruby-1.9.3-p362/yaml/make.log
Installing Ruby from source to: /Users/christiaan/.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 /Users/christiaan/.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=/Users/christiaan/.rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/Users/christiaan/.rvm/usr', please read /Users/christiaan/.rvm/log/ruby-1.9.3-p362/configure.log
There has been an error while running configure. Halting the installation.
我试过类似问题的所有提示,但似乎无法解决这个问题
YAML日志(生成的第一个错误日志):
RVM日志(生成的第二个错误日志):
你的主要问题是:
configure: error: C compiler cannot create executables
因此,寻找解决这个问题的方法。比如:
rvm install 1.9.3 --with-gcc=clang
其他例子:
RVM get head
并读取输出-修复显示在那里
此问题也会报告给RailsInstaller:Xcode->Preferences 选中“命令行工具”
另外,发布您正在使用的命令。您是否已经遵循了
rvm要求中给出的信息
?仍在等待查看您输入的命令。日志包含生成的内容。我想知道你输入并运行了什么。我建议不要用叮当声编译Ruby。它仍然不能完全兼容,您的里程数也会有所不同。坚持gcc<代码>rvm要求告诉您使用gcc设置环境的最简单方法。@Remear Ok..谢谢。我仍然觉得奇怪,人们似乎一次又一次地偶然发现同样的问题。他们没有阅读说明或rvm要求
工作不正常。奇怪..无论如何,这个特殊的问题似乎是一个gcc(Xcode?)安装问题。RVM开发面临的最大问题之一是缺乏以下指导。rvm要求已经成为安装大多数rubies所需的系统特定信息的事实标准。你只能做很多事情来获取信息,但你不能让人们真正阅读它。不幸的是,很多博客都是人们寻找解决方案的地方,其中有很多错误信息。这个特殊的问题似乎是在用户的$PATH中缺少合适的基于gcc的编译器。正如我前面提到的,我确实遵循了rvm equirements
中的所有说明,这证明了我仍然面临这个问题。我已经安装了gcc4.2,但我仍然收到相同的错误。是的,我已经安装了。
configure: error: C compiler cannot create executables
rvm install 1.9.3 --with-gcc=clang