Sensible Open Source

Blog Status

  • 4 yrs 48 wks 5 days old
  • Updated: 11 Mar 2010
  • 455 entries
  • 174 comments
Total: 1,214,017
since: 5 Apr 2005

LinkBlogS

Creating Vidcasts

18 June 2007, Monday 7:05 P GMT-06
Tags:      

Man, Can't Microsoft Catch A Break?

16 March 2007, Friday 12:26 P GMT-06

Viacom, Google andYou Tube, Oh My!

16 March 2007, Friday 12:25 P GMT-06

Switch to digital TV to start in October

16 March 2007, Friday 7:46 A GMT-06

Is the Ice Ready? No, Its Still To Hot To Use...

16 March 2007, Friday 7:43 A GMT-06

MIT Entire Curriculum At disposal of e-learners

6 March 2007, Tuesday 11:52 A GMT-06

A cure for e-mail attention disorder?

2 March 2007, Friday 12:51 A GMT-06
Tags:  

Windows-on-Mac software gets virtualization update

1 March 2007, Thursday 5:08 A GMT-06

EnterpriseDB is/n't Open Source

1 March 2007, Thursday 3:37 A GMT-06

BitTorrent download portal debuts

27 February 2007, Tuesday 9:05 A GMT-06

$45b TXU buyout

27 February 2007, Tuesday 9:02 A GMT-06

iPhone Competitors Got The Touch

26 February 2007, Monday 3:43 A GMT-06
Tags:        

HTC - Smart Mobility

25 February 2007, Sunday 4:22 A GMT-06

Hard to find 1-800 numbers

23 February 2007, Friday 8:35 A GMT-06

Cuba Embraces Open-Source Software

21 February 2007, Wednesday 3:10 A GMT-06

Vista at the tipping point, Err Dipping Point?

11 February 2007, Sunday 11:11 A GMT-06
Tags:  

PostgreSQL Open Source And Persistence

3 February 2007, Saturday 10:32 P GMT-06

Blackboard Pledges No Patent Blocks

3 February 2007, Saturday 10:28 P GMT-06

UVU

5 January 2007, Friday 11:58 P GMT-06

Open-source IP PBX software appliance"

4 January 2007, Thursday 3:44 A GMT-06

Asterisk an under-appreciated Open Source Success Story

4 January 2007, Thursday 3:43 A GMT-06

Open Source AJAX Tooling

4 January 2007, Thursday 3:41 A GMT-06

Google MAIL API Secuirty Alert

1 January 2007, Monday 7:37 P GMT-06
Tags:    

United States Patent Application: 0060288329

26 December 2006, Tuesday 4:00 A GMT-06

LinkBlog Popular Tags

                                       







««Mar 2010»»
SMTWTFS
  12
3
456
789
10
111213
14151617181920
21222324252627
28293031

 

August 16, 2012

Time Left

2 years 5 months 4 days

                   

RSS Add-Me








Google Related Links

Sudo Gem Install Mysql - On OS X With Proper Parameters

posted 27 March 2008, Thursday

I had to install, fresh, Ruby On Rails this evening.  I ran into a little road bump when issuing sudo gem install mysql on OS X.

The script prints out to the terminal:

! sudo gem install mysql
Select which gem to install for your platform (i686-darwin8.10.1)
 1. mysql 2.7.3 (mswin32)
 2. mysql 2.7.1 (mswin32)
 3. mysql 2.7 (ruby)
 4. mysql 2.6 (ruby)
 5. mysql 2.5.1 (ruby)
 6. Cancel installation

I picked 4 as a 1 & 2 are for Windows and option 3 installs the latest greatest Ruby.   I just needed Ruby 1.8 support  and therefore, I picked 4 but 5 could work, too.

My result was a failure: 

! sudo gem install mysql
Select which gem to install for your platform (i686-darwin8.10.1)
 1. mysql 2.7.3 (mswin32)
 2. mysql 2.7.1 (mswin32)
 3. mysql 2.7 (ruby)
 4. mysql 2.6 (ruby)
 5. mysql 2.5.1 (ruby)
 6. Cancel installation
> 4
Building native extensions.  This could take a while...
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/local/bin/ruby
        --with-mysql-config
        --without-mysql-config
        --with-mysql-dir
        --without-mysql-dir
        --with-mysql-include
        --without-mysql-include=${mysql-dir}/include
        --with-mysql-lib
        --without-mysql-lib=${mysql-dir}/lib
        --with-mysqlclientlib
        --without-mysqlclientlib
        --with-mlib
        --without-mlib
        --with-mysqlclientlib
        --without-mysqlclientlib
        --with-zlib
        --without-zlib
        --with-mysqlclientlib
        --without-mysqlclientlib
        --with-socketlib
        --without-socketlib
        --with-mysqlclientlib
        --without-mysqlclientlib
        --with-nsllib
        --without-nsllib
        --with-mysqlclientlib
        --without-mysqlclientlib

ERROR:  While executing gem ... (RuntimeError)
    ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/mysql-2.6 for inspection.
  

Results logged to /usr/local/lib/ruby/gems/1.8/gems/mysql-2.6/gem_make.out

  

Solution was quickly GooGleD with few wrong answers, but Hivelogic, as usual rox!!  A simple parameter was forgotten and not well documented.  So now here it is for future reference, and in stickies for my lightening fast access.  Stickies is still a great app.
 

sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config 

<Big:jes> 0 [03-28 00:10] ~/dev/vino (.007 Mb)
! sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config 
Select which gem to install for your platform (i686-darwin8.10.1)
 1. mysql 2.7.3 (mswin32)
 2. mysql 2.7.1 (mswin32)
 3. mysql 2.7 (ruby)
 4. mysql 2.6 (ruby)
 5. mysql 2.5.1 (ruby)
 6. Cancel installation
> 4
Building native extensions.  This could take a while...
mysql.c: In function 'query':
mysql.c:635: error: invalid storage class for function 'res_free'
mysql.c:637: error: 'res_free' undeclared (first use in this function)
mysql.c:637: error: (Each undeclared identifier is reported only once
mysql.c:637: error: for each function it appears in.)
make: *** [mysql.o] Error 1
mysql.c: In function 'query':
mysql.c:635: error: invalid storage class for function 'res_free'
mysql.c:637: error: 'res_free' undeclared (first use in this function)
mysql.c:637: error: (Each undeclared identifier is reported only once
mysql.c:637: error: for each function it appears in.)
make: *** [mysql.o] Error 1
ruby extconf.rb install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
checking for mysql_ssl_set()... yes
checking for mysql.h... yes
creating Makefile

make
gcc -fno-common -g -O2 -pipe -fno-common  -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H  -I/usr/local/mysql/include -Os -arch i386 -fno-common -c mysql.c

make install
mkdir -p /usr/local/lib/ruby/gems/1.8/gems/mysql-2.6/lib
gcc -fno-common -g -O2 -pipe -fno-common  -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I/usr/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H  -I/usr/local/mysql/include -Os -arch i386 -fno-common -c mysql.c

make clean
Successfully installed mysql-2.6

There you go! 

tags:          

links: digg this    del.icio.us    technorati    reddit




1. Simon Pieman left...
26 November 2009, Thursday 1:45 am

Perfect - many thanks. This worked a treat!