Error Installing Jekyll - Native Extension Build
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
sudo apt-get install ruby-dev
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.
Robb Schiller
Updated on July 05, 2022Comments
-
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 almost 12 yearsGreat! Thanks Noah, glad to hear that's the problem. About 30 min into the install now.
-
Noah Clark almost 12 yearsI 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 almost 12 yearsAbsolutely, 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 almost 12 yearsrunning the
which make
command also is still coming back empty -
Noah Clark almost 12 yearsWhat 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 almost 12 yearsI'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 almost 12 yearsWhich means I don't think my system knows where make is located. With xcode installed it has to be there.
-
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 almost 12 yearsYeah, that's what I referencing from the link above! Glad you found it!
-
Larry Cai over 11 yearsbut it does solve my problem in Ubuntu, since the question title doesn't mention the os
-
Mat about 11 yearsPlease 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 about 11 yearsI 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 about 10 yearsOP 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 almost 10 yearsThis solution works on Raspberry Pi, just need add sudo for the second command: sudo gem install jekyll
-
Brady Trainor almost 10 yearsThank you! I had to
sudo apt-get remove ruby
as I had Ruby 1.9.3, and it wouldn't let mesudo gem install jekyll
. -
Mahesha999 about 9 yearsbut no one says anything about Windows :(
-
Charles-Eugene Loubao over 8 yearsInstalling ruby dev fixed the issue. PS: For fedora:
# dnf install ruby ruby-dev
-
m3nda about 8 yearsSame 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 over 7 yearsI needed
sudo
on both commands. Other than that: GREAT. (Unbuntu MATE 14.04)