HeatWare.net header image
HeatWare.net
TwitterRSSEmail
  • Home
  • Windows
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
  • Linux/Unix
  • Mac
  • Mobile
    • Android
    • iOS
    • Phones (Help / Resources)
  • Software / Programming
    • Free Software
    • Programming – General
    • PHP
    • Ruby/Rails
    • Quality Assurance (QA)
    • Software – General
    • Software Help
    • Databases
  • Cool Websites
  • Other
    • Deals & Bargains
    • News
    • Video Games
    • Hardware
    • Electronics
  • About

13 comments / February 5, 2011 / sood / Programming – Ruby/Rails

Solved! Installing sqlite3-ruby gem – extconf.rb mkmf LoadError

Are you attempting to install the sqlite3-ruby gem and you are receiving this error?


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

/usr/bin/ruby1.8 extconf.rb
extconf.rb:3:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:3

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.3 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out

Well, we have the solution for you. Your Linux installation requires that the development libraries for SQLite3 to be installed in order to build the gem. Here is the proper way for install this gem:

How to install sqlite3-ruby gem

sudo apt-get install sqlite3
sudo apt-get install libsqlite3-dev
sudo gem install sqlite3-ruby

If you are still having trouble….

Try installing the development package of Ruby 1.8 by using the command below, and then attempt to install Sqlite3:
sudo apt-get install ruby1.8-dev

Related Posts

  • Solved! Installing mysql gem - extconf.rb failed error
  • Fetch error installing Java on Ubuntu 11.04. Solved!
  • How to install RubyGems on Linux (Ubuntu & Other)
  • How to install Ruby 1.8.7 on CentOS 5.5 Linux
  • Codeigniter 2.0: How to Download & Install
13 comments… add one
  1. Matt March 23, 2011, 8:23 am

    After running the commands you suggest, I am still getting the same error when I try to install the Ruby gem. Any ideas what else I could be missing?

  2. Matt March 23, 2011, 8:35 am

    Figured it out! After searching around to uncover why it was failing to load ‘mkmf’, I found that I needed to install the ruby1.8-dev package:

    sudo apt-get install ruby1.8-dev

    Kudos goes to: http://mentalized.net/journal/2006/01/24/no_such_file_to_load_mkmf/

  3. Justin Clark-Casey April 25, 2011, 2:35 pm

    Thanks a lot sood and Matt – that fixed this issue for me on Ubuntu 10.10 without having to hunt over the interwebs.

  4. sood April 25, 2011, 10:38 pm

    Justin,
    Glad to hear that this post was helpful. I have updated it to include what Matt mentioned.

  5. Martin May 18, 2011, 9:08 am

    Thanks, I really appreciate this help. 🙂

  6. suteno May 22, 2011, 8:26 am

    Great, after installing ruby1.8-dev, everything installed just as expected! Btw, when installing sqlite3-ruby, i got this sweet little message:

    Hello! The sqlite3-ruby gem has changed it’s name to just sqlite3. Rather than
    installing `sqlite3-ruby`, you should install `sqlite3`. Please update your
    dependencies accordingly.

    Thanks from the Ruby sqlite3 team!

    <3 <3 <3 <3

    maybe you should update your howto, too 😛

    Thanks again, suteno

  7. Rob June 2, 2011, 12:33 am

    ahah! I run Linux Mint 11 and the command:

    sudo apt-get install libsqlite3-dev

    is what made the difference, finally I could install the sqlite3 gem

  8. Tom June 10, 2011, 10:35 pm

    This helped out a lot! Thanks!

  9. Milos July 13, 2011, 7:58 am

    That worked! (ruby1.8-dev)

  10. JPC October 6, 2011, 7:48 pm

    Thanks Matt! I was stuck installing the selenium-webdriver gem, but installing the ruby dev package fixed this error. I thought gems were supposed to figure out dependencies like this?

  11. Analía Lorenzatto September 9, 2012, 10:41 am

    It worked perfectly!

    sudo apt-get install sqlite3
    sudo apt-get install libsqlite3-dev
    sudo gem install sqlite3-ruby
    sudo gem install sqlite3

    Thank you very Sood for the suggestion!

  12. Stefan Wille August 5, 2015, 12:21 pm

    Try:

    sudo apt-get install ruby-dev

  13. Frank Seager December 8, 2015, 10:35 pm

    And if your on a Windows Machine?

Cancel reply

Leave a Comment

Recent Posts

  • Why You Should Consider Diving Apps
  • How to Buy a Smartphone that Fits Your Budget
  • How to Overcome Frustrating PDF Stress
  • Convert PDF to Word: Easy, Reliable and Quality Conversion
  • PDF to Excel App ­ – A New Way of Handling Tricky Documents

Recent Comments

  • Foo on PostgreSQL: How to reload config settings without restarting database
  • Sharon Wilson-Smith on 9 Signs Your Smartphone Needs a Highly Durable Case
  • Mitja on Why You Should Consider Diving Apps
  • Nasir Haider on How to create a large number of files in Linux (thousands or millions)
  • Kes on How to see active SQL queries and open connections in Postgres?

Tags

ACSLS Android Cell Phones Cool Software Cool Websites Databases Facebook File System Free Software G2x Galaxy S5 Hot Deals iOS iPhone ISO LG Linux Linux/Unix Mac Mobile mysql OpenStack OS X PHP Postgres PostgreSQL Printers Programming ruby Samsung Galaxy S6 Shell Smartphones Sun T-Mobile Tips Tips & Tricks Ubuntu Unix Virtualization VMWare Windows Windows 7 Windows 8 Windows Vista Windows XP

Latest Tweet

Follow @HeatwaredotNet

SP
@HeatwaredotNet

  • Why You Should Consider Diving Apps https://t.co/Is41cdUv2I #diving-apps
    about 2 years ago

All Categories

Other Links

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Copyright © 2015 — HeatWare