sudo gem install mysql problem

Discussion in 'Ruby' started by Pen Ttt, May 5, 2010.

  1. Pen Ttt

    Pen Ttt Guest

    today i have installed ubuntu10.04.
    pt@pt-laptop:~$ ruby -v
    ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
    pt@pt-laptop:~$ gem -v
    1.3.5
    pt@pt-laptop:~$ sudo gem install mysql
    Building native extensions. This could take a while...
    ERROR: Error installing mysql:
    ERROR: Failed to build gem native extension.

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


    Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
    for inspection.
    Results logged to
    /var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

    how to sovle the problem?
    --
    Posted via http://www.ruby-forum.com/.
    Pen Ttt, May 5, 2010
    #1
    1. Advertising

  2. Pen Ttt

    Rich McGrath Guest

    Re: sudo gem install mysql problem

    [Note: parts of this message were removed to make it a legal post.]

    try sudo gem install mysql -- --with-mysql-dir= *Put Location Mysql
    directory here.*
    I.E.
    sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
    sudo gem install mysql --
    --with-mysql-config=/usr/local/mysql/bin/mysql_config

    Rich

    On Wed, May 5, 2010 at 9:41 AM, Pen Ttt <> wrote:

    > today i have installed ubuntu10.04.
    > pt@pt-laptop:~$ ruby -v
    > ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
    > pt@pt-laptop:~$ gem -v
    > 1.3.5
    > pt@pt-laptop:~$ sudo gem install mysql
    > Building native extensions. This could take a while...
    > ERROR: Error installing mysql:
    > ERROR: Failed to build gem native extension.
    >
    > /usr/bin/ruby1.8 extconf.rb
    > extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
    > from extconf.rb:10
    >
    >
    > Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
    > for inspection.
    > Results logged to
    > /var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
    >
    > how to sovle the problem?
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    >
    Rich McGrath, May 5, 2010
    #2
    1. Advertising

  3. Pen Ttt

    Luis Lavena Guest

    Re: sudo gem install mysql problem

    On May 5, 10:41 am, Pen Ttt <> wrote:
    > today i have installed ubuntu10.04.
    > pt@pt-laptop:~$ ruby -v
    > ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
    > pt@pt-laptop:~$ gem -v
    > 1.3.5
    > pt@pt-laptop:~$ sudo gem install mysql
    > Building native extensions. This could take a while...
    > ERROR: Error installing mysql:
    > ERROR: Failed to build gem native extension.
    >
    > /usr/bin/ruby1.8 extconf.rb
    > extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
    > from extconf.rb:10
    >
    > Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
    > for inspection.
    > Results logged to
    > /var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
    >
    > how to sovle the problem?


    You need a full Ruby installation, from the path "/var/lib" looks like
    you're running Ubuntu.

    Please install ruby-dev package and try again.

    Also, you need mysql and libmysql-dev packages to compile.

    --
    Luis Lavena
    Luis Lavena, May 5, 2010
    #3
  4. Pen Ttt

    Rich McGrath Guest

    Re: sudo gem install mysql problem

    [Note: parts of this message were removed to make it a legal post.]

    This Doc might help.

    https://help.ubuntu.com/community/RubyOnRails

    <https://help.ubuntu.com/community/RubyOnRails>Rich

    On Wed, May 5, 2010 at 12:30 PM, Luis Lavena <> wrote:

    > On May 5, 10:41 am, Pen Ttt <> wrote:
    > > today i have installed ubuntu10.04.
    > > pt@pt-laptop:~$ ruby -v
    > > ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
    > > pt@pt-laptop:~$ gem -v
    > > 1.3.5
    > > pt@pt-laptop:~$ sudo gem install mysql
    > > Building native extensions. This could take a while...
    > > ERROR: Error installing mysql:
    > > ERROR: Failed to build gem native extension.
    > >
    > > /usr/bin/ruby1.8 extconf.rb
    > > extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
    > > from extconf.rb:10
    > >
    > > Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
    > > for inspection.
    > > Results logged to
    > > /var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
    > >
    > > how to sovle the problem?

    >
    > You need a full Ruby installation, from the path "/var/lib" looks like
    > you're running Ubuntu.
    >
    > Please install ruby-dev package and try again.
    >
    > Also, you need mysql and libmysql-dev packages to compile.
    >
    > --
    > Luis Lavena
    >
    >



    --
    Rich McGrath
    Tech Lead for Bitmob.com

    www.Bitmob.com
    www.twitter.com/Bitmobrich
    Rich McGrath, May 5, 2010
    #4
  5. Pen Ttt

    lyn Guest

    Re: sudo gem install mysql problem

    On May 6, 2:29 am, Luis Lavena <> wrote:
    > On May 5, 10:41 am, Pen Ttt <> wrote:
    >
    >
    >
    > > today i have installed ubuntu10.04.
    > > pt@pt-laptop:~$ ruby -v
    > > ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
    > > pt@pt-laptop:~$ gem -v
    > > 1.3.5
    > > pt@pt-laptop:~$ sudo gem install mysql
    > > Building native extensions. This could take a while...
    > > ERROR: Error installing mysql:
    > > ERROR: Failed to build gem native extension.

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

    >
    > > Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
    > > for inspection.
    > > Results logged to
    > > /var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

    >
    > > how to sovle the problem?

    >
    > You need a full Ruby installation, from the path "/var/lib" looks like
    > you're running Ubuntu.
    >
    > Please install ruby-dev package and try again.
    >
    > Also, you need mysql and libmysql-dev packages to compile.
    >
    > --
    > Luis Lavena


    I've been scratching my head all afternoon as you suggested sudo apt-
    get install ruby-dev and then running sudo gem install mysql worked
    sort of I got a whole lot of definition errors but I'm closer than I
    was
    lyn, May 18, 2010
    #5
  6. Pen Ttt

    lyn Guest

    Re: sudo gem install mysql problem

    On May 5, 11:41 pm, Pen Ttt <> wrote:
    > today i have installed ubuntu10.04.
    > pt@pt-laptop:~$ ruby -v
    > ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
    > pt@pt-laptop:~$ gem -v
    > 1.3.5
    > pt@pt-laptop:~$ sudo gem install mysql
    > Building native extensions. This could take a while...
    > ERROR: Error installing mysql:
    > ERROR: Failed to build gem native extension.
    >
    > /usr/bin/ruby1.8 extconf.rb
    > extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
    > from extconf.rb:10
    >
    > Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
    > for inspection.
    > Results logged to
    > /var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
    >
    > how to sovle the problem?
    > --
    > Posted viahttp://www.ruby-forum.com/.


    I was getting the exact same error - I can get sudo gem install mysql
    to load only after running sudo apt-get install ruby-dev but then
    rails app reports wrong wrong gem version and asks me to 2.2.3 back
    from 2.2.5 sudo gem install -v=2.2.3 rails run app and web brick
    starts and displays default page go to generators scaffold works then
    rake db migrate you should get a password error alter user name and
    password for all environments and I am hoping that works
    lyn, May 18, 2010
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gavin Kistner

    Can't install gems with sudo

    Gavin Kistner, Sep 13, 2006, in forum: Ruby
    Replies:
    3
    Views:
    110
    Phrogz
    Sep 13, 2006
  2. Une Bévue

    sudo gem install -r webrick FAILED

    Une Bévue, Oct 21, 2006, in forum: Ruby
    Replies:
    2
    Views:
    102
    Eric Hodel
    Oct 23, 2006
  3. Brian Puccio
    Replies:
    3
    Views:
    378
    John Joyce
    Mar 3, 2008
  4. Mike Nicholaides
    Replies:
    3
    Views:
    83
    Mike Nicholaides
    Mar 28, 2008
  5. Piotr S.
    Replies:
    14
    Views:
    277
    Luis Lavena
    Jan 21, 2011
Loading...

Share This Page