安装RVM时运行'make -j2'时出错 [英] Error running 'make -j2' when installing RVM
问题描述
我正在按照本教程在Mac上设置Rails:
I'm following this tutorial on setting up Rails on your Mac :
http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/
当我进入第6步:使用Ruby 1.9.3安装RVM 并运行curl -L https://get.rvm.io | bash -s stable --ruby
来安装RVM时,出现以下错误:
When I get to Step 6: Install RVM with Ruby 1.9.3, and run curl -L https://get.rvm.io | bash -s stable --ruby
to install RVM, I get the following error :
Error running 'make -j2', please read ~/.rvm/log/ruby-1.9.3-p385/make.log
There has been an error while running make. Halting the installation.
在make.log中,它是生成的:
In make.log, here is what it generated :
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
make: *** Waiting for unfinished jobs....
我发现这很有趣,因为我之前在类似的设置中遵循了本指南,并且没有遇到任何问题.
I find this strage as I've followed this guide before on a similar setup and didn't encounter any problems.
有什么想法吗?
推荐答案
当您使用clang
=> 除非您有兴趣测试Ruby/clang
的兼容性,否则最好使用gcc-4.2
编译ruby(请参阅 https://bugs.ruby-lang.org/issues/5883 了解详情)
Unless you are interested in testing Ruby/clang
compatibility you would be better with compiling ruby using gcc-4.2
(see https://bugs.ruby-lang.org/issues/5883 for details)
跳过安装程序中的--ruby
标志:
Skip the --ruby
flag from the installer:
\curl -L https://get.rvm.io | bash -s stable
RVM具有使用自制软件安装所有必需软件包的命令:
RVM has a command to install all required packages using homebrew:
rvm requirements run force
如果没有自制软件,它将显示所需软件包的列表.
In case homebrew is not available it will display the list of required packages.
替代,有一个补丁可以使其与clang一起使用,请使用以下命令安装ruby:
Alternative there is a patch that could make it working with clang, install ruby using:
rvm install 1.9.3-p385 --patch https://bugs.ruby-lang.org/attachments/download/3496/disable-werror.patch -C --disable-werror
这篇关于安装RVM时运行'make -j2'时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!