Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lazy symbol binding failed when creating ruby db

I am trying to install ruby on rails, and everything is installed now so far, but when I try to create a database with rake db:create, I get a weird error:

dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle Expected in: flat namespace

dyld: Symbol not found: _mysql_get_client_info Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle Expected in: flat namespace

Trace/BPT trap: 5

I am working on osx mountain lion latest update. Does anyone have the right solution for me?

like image 785
Reshad Avatar asked Mar 08 '13 11:03

Reshad


1 Answers

You might try this.

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

Be sure to modify the mysql config path with the location for yours.

You can determine this with the following command.

locate mysql_config

Leverage the path given with the command above.

like image 190
Robert Avatar answered Sep 28 '22 18:09

Robert