install mysql problem

Discussion in 'Ruby' started by Pen Ttt, Dec 7, 2010.

  1. Pen Ttt

    Pen Ttt Guest

    in my console,
    pt@pt:~$ sudo gem install mysql
    [sudo] password for pt:
    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
    pt@pt:~$ gem -v
    1.3.7
    pt@pt:~$
    what's wrong?

    --
    Posted via http://www.ruby-forum.com/.
    Pen Ttt, Dec 7, 2010
    #1
    1. Advertising

  2. On Tue, Dec 7, 2010 at 8:15 AM, Pen Ttt <> wrote:
    > in my console,
    > pt@pt:~$ sudo gem install mysql
    > [sudo] password for pt:
    > Building native extensions. =A0This could take a while...
    > ERROR: =A0Error installing mysql:
    > =A0ERROR: Failed to build gem native extension.
    >
    > /usr/bin/ruby1.8 extconf.rb
    > extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
    > =A0from 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
    > pt@pt:~$ gem -v
    > 1.3.7
    > pt@pt:~$
    > what's wrong?


    You are missing the headerfiles for MySQL. If you re on a binary
    distribution, "apt-get install mysql-dev" or "yum install mysql-dev"
    should make the gem install work (adjust the installation command to
    your distribution of *NIX of choice, of course).

    --=20
    Phillip Gawlowski

    Though the folk I have met,
    (Ah, how soon!) they forget
    When I've moved on to some other place,
    There may be one or two,
    When I've played and passed through,
    Who'll remember my song or my face.
    Phillip Gawlowski, Dec 7, 2010
    #2
    1. Advertising

  3. Pen Ttt

    Pen Ttt Guest

    pt@pt:~$ apt-get install mysql-dev
    E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission
    denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you
    root?
    pt@pt:~$ sudo apt-get install mysql-dev
    [sudo] password for pt:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package mysql-dev
    pt@pt:~$

    --
    Posted via http://www.ruby-forum.com/.
    Pen Ttt, Dec 7, 2010
    #3
  4. Pen Ttt

    flebber Guest

    On Dec 7, 7:06 pm, Pen Ttt <> wrote:
    > pt@pt:~$ apt-get install mysql-dev
    > E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission
    > denied)
    > E: Unable to lock the administration directory (/var/lib/dpkg/), are you
    > root?
    > pt@pt:~$ sudo apt-get install mysql-dev
    > [sudo] password for pt:
    > Reading package lists... Done
    > Building dependency tree
    > Reading state information... Done
    > E: Unable to locate package mysql-dev
    > pt@pt:~$
    >
    > --
    > Posted viahttp://www.ruby-forum.com/.


    sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/
    mysql_config
    flebber, Dec 7, 2010
    #4
  5. Pen Ttt

    Luis Lavena Guest

    On Dec 7, 4:15 am, Pen Ttt <> wrote:
    > in my console,
    > pt@pt:~$ sudo gem install mysql
    > [sudo] password for pt:
    > 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
    > pt@pt:~$ gem -v
    > 1.3.7
    > pt@pt:~$
    > what's wrong?
    >


    Your installation of Ruby is not complete.

    Please install ruby-full

    sudo apt-get install ruby-full

    Also, mysql gem requires mysql headers, try "sudo apt-get install
    mysql-dev", but dunno if that works as I'm not familiarized with
    Debian/Ubuntu packaging conventions

    --
    Luis Lavena
    Luis Lavena, Dec 7, 2010
    #5
    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. washakie
    Replies:
    4
    Views:
    921
    washakie
    Jan 15, 2008
  2. Replies:
    1
    Views:
    106
  3. gao zhixin
    Replies:
    1
    Views:
    1,152
    David Vallner
    Feb 12, 2006
  4. Pen Ttt

    sudo gem install mysql problem

    Pen Ttt, May 5, 2010, in forum: Ruby
    Replies:
    5
    Views:
    127
  5. Younes Baghor

    Problem install mysql Gem OS 10.6.4

    Younes Baghor, Sep 20, 2010, in forum: Ruby
    Replies:
    6
    Views:
    142
    Younes Baghor
    Sep 20, 2010
Loading...

Share This Page