Tuesday, 15 May 2012

ruby - mysql2 gem fails to compile with MySQL 5.6.12 on OS X with Homebrew -


I have updated all the packages installed with homebrew, I MySQL 5.6.12 (from 5.5.27 or higher) Has been upgraded to:

  $ mysql --version mysql Ver 14.14 Distrib 5.6.12, use of the EditLine wrapper for OS X 10.8 (x86_64)   

And now mysql2 mani no longer compiles:

  $ gem install mysql2 Basic extension building may take some time ... error: error installing mysql2: error : In making gem native extension Failed Checking for rb_wait_for_single_fd () is checking for /users/pupeno/.rvm/rubies/ruby-1.9.3-p429-perf/bin/ruby extconf.rb for Rb_thread_blocking_region () ... yes mysql Checking for .h ..no checks for mysql / mysql.h ... no ----- mysql.h is unavailable. Please check your installation and try again. ----- *** extconf.rb Failed *** Could not make Makefile due to some reason, perhaps lacking necessary libraries and / You may need configuration options. Provided configuration options: - with-opt-dial - with-opt-in - without-opt-in = $ {opt-dir} / include --with-opt-lib - without-opt-Lib = $ {opt -dir} / lib - co-meg-prod - without-make-go -srcdir =. --curdir --ruby = / user / pupeno / .rvm / rubies / ruby-1.9.3-p429-perf / bin / ruby ​​-with-mysql-config - without-mysql-config   

file exists in mysql.h /usr/local/Cellar/mysql/5.6.12/include/mysql.h . What is happening on any idea?

The file does not appear in mysql.h / usr / local because the symlink should look deeper than:

  $ ls -la / usr / local / include / mysql lrwxr-xr-x 1 pupeno admin 36 21 Jun 15:18 / usr / local / include / mysql @ - & gt; ../Cellar/mysql/5.6.12/include/mysql   

instead of

  /usr/local/Cellar/mysql/5.6.12/   

After joining, I have manually set the symlink and the compilation is still unsuccessful. That's why I got stuck.

I had one problem, I managed to fix it. I have done a lot, and I do not know how to do it, but going to MySQL 5.6.10.

Uninstall MySQL 5.6.12:

  Unlink Break Mysql brew uninstall mysql   

Go to the homebrew directory:

  cd / usr / local   

version 5.6.10 (You can find a list of versions by running brew version mysql Git Checkout 48f7e86 Library / Formula / mysql.rb

Then install mysql again:

  Install brew mysql   

and now install gem mysql2 works for me.

I also From the source (mysql --build-from-source install), but it is not resolved, but mysql is installed from the source, but can be part of the solution.

No comments:

Post a Comment