简体   繁体   中英

Error installing gem

I typed 'gem install middleman' in my terminal and got the following error message:

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

Do you have any GCC installed (if you're on a Mac, you need to install Xcode)?

which gcc

If you already have a version of gcc, you can simply symlink to it

ln -s /usr/bin/gcc /usr/bin/gcc-4.2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM