[英]Error installing gem
I typed 'gem install middleman' in my terminal and got the following error message: 我在终端中输入“ gem install middleman”,并收到以下错误消息:
Building native extensions. This could take a while...
ERROR: Error installing middleman:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb
creating Makefile
make
compiling hitimes.c
make: gcc-4.2: No such file or directory
make: *** [hitimes.o] Error 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p429/gems/hitimes-1.2.2 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p429/gems/hitimes-1.2.2/ext/hitimes/c/gem_make.out
Looks like you're missing gcc-4.2
看来您缺少gcc-4.2
Do you have any GCC installed (if you're on a Mac, you need to install Xcode)? 是否已安装任何GCC(如果在Mac上,则需要安装Xcode)?
which gcc
If you already have a version of gcc, you can simply symlink to it 如果您已经有了gcc版本,则可以简单地符号链接到它
ln -s /usr/bin/gcc /usr/bin/gcc-4.2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.