This repository has been archived by the owner. It is now read-only.

Installing Jekyll: ERROR: Failed to build gem native extension. #209

Closed
alexwoolley opened this Issue Dec 10, 2014 · 20 comments

Comments

Projects
None yet
@alexwoolley

alexwoolley commented Dec 10, 2014

Hello,

Completely new to Jekyll, so apologies if this is a stupid question. After running

gem install jekyll

I get the following error message:

Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.

``/usr/bin/ruby2.1 -r ./siteconf20141210-5038-1u40f3s.rb extconf.rb``

mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.1.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/fast-stemmer-1.0.2/gem_make.out

Seems like the commonest solution to this is to run

sudo apt-get install ruby1.9.1-dev

But this ain't solving the problem for me -- anyone got any tips..?

@alexwoolley

This comment has been minimized.

Show comment
Hide comment
@alexwoolley

alexwoolley Dec 10, 2014

PS this is on Ubuntu

alexwoolley commented Dec 10, 2014

PS this is on Ubuntu

@sondr3

This comment has been minimized.

Show comment
Hide comment
@sondr3

sondr3 Dec 11, 2014

Sounds like you are missing the ruby-dev package, try installing it with sudo apt-get install ruby-dev and see if it works then with the newest version of Ruby.

sondr3 commented Dec 11, 2014

Sounds like you are missing the ruby-dev package, try installing it with sudo apt-get install ruby-dev and see if it works then with the newest version of Ruby.

@redknitin

This comment has been minimized.

Show comment
Hide comment
@redknitin

redknitin Dec 12, 2014

@alexwoolley , as @sondr3 mentioned, the issue is most definitely because you are missing the ruby-dev package. You may also have to install other dependencies (Javascript and Python).

There is a jekyll package available for Ubuntu (look it up on Synaptic Package Manager) though I'm not sure of what version of jekyll it is. The package version is 0.11.2-1, which could possibly refer to Jekyll version 2.1 - that's just a guess from the package version and I could be wrong.

redknitin commented Dec 12, 2014

@alexwoolley , as @sondr3 mentioned, the issue is most definitely because you are missing the ruby-dev package. You may also have to install other dependencies (Javascript and Python).

There is a jekyll package available for Ubuntu (look it up on Synaptic Package Manager) though I'm not sure of what version of jekyll it is. The package version is 0.11.2-1, which could possibly refer to Jekyll version 2.1 - that's just a guess from the package version and I could be wrong.

@sondr3

This comment has been minimized.

Show comment
Hide comment
@sondr3

sondr3 Dec 12, 2014

Don't use the Jekyll package on Ubuntu, it is incredibly old and not supported at all, people have previously been burnt by it, stay with the version you get from the gem.

sondr3 commented Dec 12, 2014

Don't use the Jekyll package on Ubuntu, it is incredibly old and not supported at all, people have previously been burnt by it, stay with the version you get from the gem.

@alexwoolley

This comment has been minimized.

Show comment
Hide comment
@alexwoolley

alexwoolley Dec 14, 2014

Thanks so much guys -- so sorry I've taken a while to reply!

All's working now

alexwoolley commented Dec 14, 2014

Thanks so much guys -- so sorry I've taken a while to reply!

All's working now

@dhanvi

This comment has been minimized.

Show comment
Hide comment
@dhanvi

dhanvi May 3, 2015

👍 for the issue this saved my day too 😄

dhanvi commented May 3, 2015

👍 for the issue this saved my day too 😄

@femontanha

This comment has been minimized.

Show comment
Hide comment
@femontanha

femontanha May 15, 2015

Helps me too! Thanks all

femontanha commented May 15, 2015

Helps me too! Thanks all

@joaobentes

This comment has been minimized.

Show comment
Hide comment
@joaobentes

joaobentes Jun 11, 2015

Thank you. Help me too!

joaobentes commented Jun 11, 2015

Thank you. Help me too!

@redtrumpet

This comment has been minimized.

Show comment
Hide comment
@redtrumpet

redtrumpet Jun 13, 2015

Thanks, this solved my problem!

redtrumpet commented Jun 13, 2015

Thanks, this solved my problem!

@schmanat

This comment has been minimized.

Show comment
Hide comment
@schmanat

schmanat Jun 16, 2015

Thanks too, solved my problem!

schmanat commented Jun 16, 2015

Thanks too, solved my problem!

@tshriver

This comment has been minimized.

Show comment
Hide comment
@tshriver

tshriver commented Jul 7, 2015

Thanks!

@sara-02

This comment has been minimized.

Show comment
Hide comment
@sara-02

sara-02 Jul 13, 2015

Tried the above solution, I am still getting the error

sara-02 commented Jul 13, 2015

Tried the above solution, I am still getting the error

@dylan-cooper

This comment has been minimized.

Show comment
Hide comment
@dylan-cooper

dylan-cooper Jul 22, 2015

Thanks! Also solved my problem. I have ruby 2.2 installed, so I needed

sudo apt-get install ruby2.2-dev

as ruby-dev installed it for ruby 1.9.3

dylan-cooper commented Jul 22, 2015

Thanks! Also solved my problem. I have ruby 2.2 installed, so I needed

sudo apt-get install ruby2.2-dev

as ruby-dev installed it for ruby 1.9.3

@cesards

This comment has been minimized.

Show comment
Hide comment
@cesards

cesards commented Aug 3, 2015

👍 Nice! @sondr3

@marceloavan

This comment has been minimized.

Show comment
Hide comment
@marceloavan

marceloavan Aug 6, 2015

useful, thanks

marceloavan commented Aug 6, 2015

useful, thanks

@HieronyM

This comment has been minimized.

Show comment
Hide comment
@HieronyM

HieronyM commented Oct 22, 2015

Useful.

@atru

This comment has been minimized.

Show comment
Hide comment
@atru

atru Oct 29, 2015

@sara-02, I had the same problem. Running sudo apt-get install make solved the issue for me. Though I had problems with finding the right version of Jekyll (only sudo gem install jekyll -v '1.5.1' worked for my ruby 1.9.1 environment).

atru commented Oct 29, 2015

@sara-02, I had the same problem. Running sudo apt-get install make solved the issue for me. Though I had problems with finding the right version of Jekyll (only sudo gem install jekyll -v '1.5.1' worked for my ruby 1.9.1 environment).

@msudgh

This comment has been minimized.

Show comment
Hide comment
@msudgh

msudgh commented Jan 20, 2016

thanks

@sondr3

This comment has been minimized.

Show comment
Hide comment
@sondr3

sondr3 Feb 7, 2016

Do you have all the build tools as well? GCC, make and so on?

sondr3 commented Feb 7, 2016

Do you have all the build tools as well? GCC, make and so on?

@ragmha

This comment has been minimized.

Show comment
Hide comment

@jekyll jekyll locked and limited conversation to collaborators Feb 8, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.