且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

OSX 10.7 Lion 上的 MySQL gem

更新时间:2023-08-27 23:53:04

我一直在努力解决这个问题.上述两个指针有效.这是我所做的:

I had been struggling with this issue. The two above pointers worked. Here is what I did:

  1. 添加到 .zshrc 或您的 .bash_profile:

  1. Added to .zshrc or your .bash_profile:

导出 DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"

执行这个:

env ARCHFLAGS="-arch x86_64" sudo gem install mysql -v='2.8.1' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config