尝试安装ruby时,我收到以下响应。由于我是这项技术的新手,我正在努力解决这个问题。任何帮助将不胜感激。在此先感谢!!
Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/tn/plvd9hsd2cz5b07805zxdzf40000gp/T/ruby-build.20131224182655.29784
Results logged to /var/folders/tn/plvd9hsd2cz5b07805zxdzf40000gp/T/ruby-build.20131224182655.29784.log
Last 10 log lines:
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/local/bin/gcc-4.2
checking whether the C compiler works... no
configure: error: in `/var/folders/tn/plvd9hsd2cz5b07805zxdzf40000gp/T/ruby-build.20131224182655.29784/yaml-0.1.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
BUILD FAILED
Inspect or clean up the working tree at /var/folders/tn/plvd9hsd2cz5b07805zxdzf40000gp/T/ruby-build.20131224182655.29784
Results logged to /var/folders/tn/plvd9hsd2cz5b07805zxdzf40000gp/T/ruby-build.20131224182655.29784.log
Last 10 log lines:
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/local/bin/gcc-4.2
checking whether the C compiler works... no
configure: error: in `/var/folders/tn/plvd9hsd2cz5b07805zxdzf40000gp/T/ruby- build.20131224182655.29784/yaml-0.1.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found. Stop.
答案 0 :(得分:0)
无法从这些信息中找到答案。尝试查看 config.log 。
如果您是第一次安装,请尝试使用rbenv。按照步骤安装Ruby 2.0:
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
source ~/.bash_profile
rbenv install 2.0.0-p247
rbenv global 2.0.0-p247
rbenv rehash
ruby -v #This is to check whether Ruby got installed or not
gem install bundler