Error Failed To Build Gem Native Extension. Extconf.rb
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Unable to install gem - Failed to build gem native extension - cannot load such file — mkmf (LoadError) up vote 131 down vote favorite 18 Ruby 1.9.3 The part of Gemfile #............... gem "pony" gem "bcrypt-ruby", :require => "bcrypt" gem "nokogiri" #.................. When I'm trying to install gems, I get an error alex@ubuntu:~/$ bundle Fetching gem metadata from http://rubygems.org/......... Fetching gem metadata from http://rubygems.org/.. Enter your password to install the bundled RubyGems to your system: #####............................................................ Installing bcrypt-ruby (3.0.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from extconf.rb:36:in `
Sign in Pricing Blog Support Search GitHub This repository Watch 111 Star 3,415 Fork 533 eventmachine/eventmachine Code Issues 156 Pull requests 35 Projects 0 Wiki Pulse Graphs ERROR: Failed to build gem native extension #643 Closed craigmdennis opened this Issue Oct 9, 2015 · 36 comments Projects None yet Labels None yet Milestone No milestone http://stackoverflow.com/questions/13767725/unable-to-install-gem-failed-to-build-gem-native-extension-cannot-load-such Assignees No one assigned 33 participants and others craigmdennis commented Oct 9, 2015 I'm trying to install middleman but it crashes when trying to install version 1.0.8 of eventemitter. I'm running OSX 10.11 El Capitan. I use rbenv and have tried ruby 2.1.7 and 2.2.0 The full https://github.com/eventmachine/eventmachine/issues/643 error is below: Installing eventmachine 1.0.8 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/local/var/rbenv/versions/2.1.7/bin/ruby extconf.rb checking for rb_trap_immediate in ruby.h,rubysig.h... no checking for rb_thread_blocking_region()... yes checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes checking for inotify_init() in sys/inotify.h... no checking for __NR_inotify_init in sys/syscall.h... no checking for writev() in sys/uio.h... yes checking for rb_thread_fd_select()... yes checking for rb_fdset_t in ruby/intern.h... yes checking for pipe2() in unistd.h... no checking for accept4() in sys/socket.h... no checking for SOCK_CLOEXEC in sys/socket.h... no checking for rb_wait_for_single_fd()... yes checking for rb_enable_interrupt()... no checking for rb_time_new()... yes checking for sys/event.h... yes checking for sys/queue.h... yes CFLAGS= -O3 -Wno-error=shorten-64-to-32 -pipe -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result CPPFLAGS=-I/usr/local/var/rbenv/versions/2.1.7/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags) -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result checking for clock_gettime()... no checking for gethrtime()... no creating Makefile make "DESTDIR=" clean m
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow http://askubuntu.com/questions/600068/cant-install-a-ruby-package-failed-to-build-gem-native-extension the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. http://hire.chrisjlee.net/node/229 Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Can't install a Ruby package: error failed Failed to build gem native extension up vote 2 down vote favorite 1 I installed ruby 2.1.0 and package pdfbeads on 32bit 12.04 last year following the blog https://railssavvy.wordpress.com/2012/06/02/install_ruby_and_rails/, and it worked. Now it seems that I have installed ruby 2.2.0 on 64bit 14.04, but met the problem when installing pdfbeads. Installing rvm and ruby: I heard the ruby in Ubuntu repository does not work (but I don't know if that still applies), so error failed to I followed https://railssavvy.wordpress.com/2012/06/02/install_ruby_and_rails/ to install rvm and ruby. I am not sure if I did the right things in the following: gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 curl -L get.rvm.io | bash -s stable I originally first ran curl -L get.rvm.io | bash -s stable first, but it asked me to run the gpg command before it. Then I add a line to ~/.bashrc: PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting And a couple of lines to ~/.bash_profile: [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" Then I ran: source ~/.rvm/scripts/rvm rvm requirements rvm autolibs disable $ rvm install 2.2.0 Already installed ruby-2.2.0. To reinstall use: rvm reinstall ruby-2.2.0 it tells me I have installed ruby already, then I checked the output of the previous commands, and found that curl -L get.rvm.io | bash -s stable seems already installed ruby. Then I ran: rvm --default use 2.2.0 Did I install rvm and ruby correctly? Or is there some better way to do that? Now I would like to install a package pdfbeads: $ gem install pdfbeads Building native extensions. This could take a while... ERROR: Error installing pdfbeads: ERROR: Failed to build gem native extension. /home/t/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150322-21902-q15297.rb extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick
/usr/bin/ruby1.9.1 extconf.rb Thursday, May 29, 2014 - 00:19I was trying to install jekyll: % sudo gem install jekyll Building native extensions. This could take a while... ERROR: Error installing jekyll: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from extconf.rb:1:in `' Error: failed to build gem native extension I ended up with this error: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb or if you want the more verbose error it was this: Building native extensions. This could take a while... ERROR: Error installing jekyll: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from extconf.rb:1:in `' Gem files will remain installed in /var/lib/gems/1.9.1/gems/fast-stemmer-1.0.2 for inspection. Results logged to /var/lib/gems/1.9.1/gems/fast-stemmer-1.0.2/ext/gem_make.out Solution The cause for this would be that one doesn't have the right ubuntu dependancies. This is easily fixable by installing the ruby-dev package: (sudo) apt-get install ruby-dev Hope this helps. I don't know ruby so good luck. Resources Failed to build gem native extentions Log in or register to post comments Tags:rubyjekyll © 2016 Chris J. Lee