Error Installing Jekyll - Native Extension Build

30,072

Solution 1

Your problem is that either you system doesn't know where make is located at or you don't have it installed. The easiest way to fix this (and probably other issues you'll run into trying to get a ruby system up and running) is to install xcode.

You can get it at http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 for lion. Or it came on a CD with your computer for earlier versions.

If you're using Lion, please see comments below for a link to how to install developer tools on Lion.

Solution 2

Ubuntu

  1. sudo apt-get install ruby-dev
  2. gem install jekyll

Solution 3

I had the same error on Ubuntu and this helped me sort it out.

You must have ruby-dev installed

apt-get install ruby-dev

Solution 4

If you installed XCode and command line tools are still missing go to Terminal and

xcode-select --install

it will prompt you to install these tools. After that just follow SrBlanco´s answer. That solved the problem for me.

Good luck.

Solution 5

Need to install "make". I am using Ubuntu 12.10. sudo apt-get install make Should work on any Debian based distro.

Share:
30,072
Robb Schiller
Author by

Robb Schiller

Updated on July 05, 2022

Comments

  • Robb Schiller
    Robb Schiller almost 2 years

    I'm having some trouble installing jekyll. Can't quite figure out how to patch the missing link. I think it's an update to Ruby, but RVM is having trouble installing alternate versions of ruby as well.

    Heres the full post:

    $ sudo gem install jekyll    
    
    ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.
    
        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
    mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
    
    
    Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/fast-stemmer-1.0.1 for inspection.
    Results logged to /Library/Ruby/Gems/1.8/gems/fast-stemmer-1.0.1/ext/gem_make.out
    

    Does this mean I need to update the version of ruby I'm using via rvm?

  • Robb Schiller
    Robb Schiller almost 12 years
    Great! Thanks Noah, glad to hear that's the problem. About 30 min into the install now.
  • Noah Clark
    Noah Clark almost 12 years
    I saw you're relatively new here so if my solution works you should come back and mark it as an acceptable answer so others can benefit from it.
  • Robb Schiller
    Robb Schiller almost 12 years
    Absolutely, Thanks so much for your help @NoahClark - Unfortunately though, I've installed xcode and am still getting the same issue when running the sudo gem install jekyll - I'll try and update ruby again via rvm?
  • Robb Schiller
    Robb Schiller almost 12 years
    running the which make command also is still coming back empty
  • Noah Clark
    Noah Clark almost 12 years
    What does typing in /usr/bin/make at the command line give you? Have you ever compiled anything for source on your system before?
  • Robb Schiller
    Robb Schiller almost 12 years
    I'm getting /usr/bin/make: No such file or directory. But I've actually just noticed something rather peculiar, My .gem .rvm .gitconfig files are are installed in the /Users/Username directory. This is actually a work computer I've not used much for dev, I am definitely fairly new to command line tools and had all of this working on my personal mac, using the work computer now I'm thinking the user settings are all jammed up. I don't think some important things are installed in the right directories.
  • Robb Schiller
    Robb Schiller almost 12 years
    Which means I don't think my system knows where make is located. With xcode installed it has to be there.
  • Noah Clark
    Noah Clark almost 12 years
    .gem, .rvm and .gitconfig could (and probably should) be in your home directory. That's not weird. Can you confirm that xcode is installed by running it? Are you on Lion? See: stackoverflow.com/questions/1469994/using-make-on-osx
  • Noah Clark
    Noah Clark almost 12 years
    Yeah, that's what I referencing from the link above! Glad you found it!
  • Larry Cai
    Larry Cai over 11 years
    but it does solve my problem in Ubuntu, since the question title doesn't mention the os
  • Mat
    Mat about 11 years
    Please don't post the same answer multiple times. Especially if you're essentially repeating what the other answers say. If you find duplicate questions, flag the so they can be merged.
  • j7nn7k
    j7nn7k about 11 years
    I answered two questions with the same answer. Because I guess people will land on both answers. I don't know what you mean by repeating the other answers! The part with the command line tools is nowhere mentioned but an essential part of the solution. Xcode alone gets you nowhere.
  • erb
    erb about 10 years
    OP did not mention it explicitly but the error message with the /System/Library/Frameworks was pretty revealing. Worked for me none the less on Ubuntu 13.10
  • ahgood
    ahgood almost 10 years
    This solution works on Raspberry Pi, just need add sudo for the second command: sudo gem install jekyll
  • Brady Trainor
    Brady Trainor almost 10 years
    Thank you! I had to sudo apt-get remove ruby as I had Ruby 1.9.3, and it wouldn't let me sudo gem install jekyll.
  • Mahesha999
    Mahesha999 about 9 years
    but no one says anything about Windows :(
  • Charles-Eugene Loubao
    Charles-Eugene Loubao over 8 years
    Installing ruby dev fixed the issue. PS: For fedora: # dnf install ruby ruby-dev
  • m3nda
    m3nda about 8 years
    Same in my case, version supplied didn't match, but tried ruby-dev then worked, as usual when you miss some packages that requires compiling.
  • Frank Nocke
    Frank Nocke over 7 years
    I needed sudo on both commands. Other than that: GREAT. (Unbuntu MATE 14.04)