Installing Ruby via RVM fails to configure [closed]

廉价感情. 提交于 2019-12-13 11:30:05

问题


I'm trying to install Ruby via RVM by running rvm install 1.9.3 but am getting a bunch of errors:

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/kuzjaved/.rvm/usr, please read /Users/kuzjaved/.rvm/log/ruby-1.9.3-p327/yaml/configure.log

Error running make, please read /Users/kuzjaved/.rvm/log/ruby-1.9.3-p327/yaml/make.log

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/kuzjaved/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/kuzjaved/.rvm/usr, please read /Users/kuzjaved/.rvm/log/ruby-1.9.3-p327/configure.log

There has been an error while running configure. Halting the installation.

I'v then tried:

rvm install 1.9.3 --with-gcc=clang

Same errors here too! What's going on and how can I fix it?


回答1:


If you want to make the whole process simpler, download RailsInstaller for OSX from http://railsinstaller.org/

It is bundled with all the common packages needed for a full Rails stack; All dependencies are covered for a generic rails installation.




回答2:


Get home-brew.Then

brew install ruby 

Make sure Xcode is installed, and all the command line plugins too.




回答3:


RVM isn't the only Ruby version manager. There's plenty of others, see here. There's also chruby, which isn't on that list.

To uninstall RVM, run rvm implode and restart the Terminal.




回答4:


RVM comes with a command that describes what you need for ruby:

rvm requirements

It should be displayed to you on first ruby installation, but if you missed it you can always read it again.

Also the output you posted includes paths to additional log files, you did not show them - I guess there are some clues that would show what is wrong.

Finally I do online support for RVM users here: http://webchat.freenode.net/?channels=rvm




回答5:


$ rvm requirement
Unrecognized command line argument: 'requirement' ( see: 'rvm usage' )

My edit to replace rvm requirement by rvm requirements in mpapis answer has been quickly rejected. I am sorry to have to insist. I'm using a recent version rvm 1.16.6.




回答6:


Maybe you can try with rbenv (before you should get rid off rvm, launching command rvm implode and removing rvm settings from ~/.bash_profile, ~/.profile or ~/.bashrc:

Get Homebrew and launch the following commands:

brew install rbenv 
brew install ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.bashrc

Exit from Terminal and reopen it. Then you can install a ruby with

rbenv install 1.9.3-p327

or your preferred ruby, finding it from rbenv install --list



来源:https://stackoverflow.com/questions/14022151/installing-ruby-via-rvm-fails-to-configure

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!