MySQL 5.5.8 与 Snow Leopard 和 mysql2 gem 问题

发布于 2024-10-15 03:52:14 字数 627 浏览 1 评论 0原文

我已经成功安装了MySQL 5.5.8和mysql2 gem 0.2.6。 但是当我执行 rake db:create 时 它告诉我:

dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib
  Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
  Reason: Incompatible library version: mysql2.bundle requires version 17.0.0 or later, but libmysqlclient.16.dylib provides version 16.0.0 - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
/Users/vvdpzz/mayday/Rakefile:4
(See full trace by running task with --trace)

我应该做什么? 如何解决这个问题?

I have installed MySQL 5.5.8 successfully and mysql2 gem 0.2.6.
but when I execute rake db:create
It tell me:

dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib
  Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
  Reason: Incompatible library version: mysql2.bundle requires version 17.0.0 or later, but libmysqlclient.16.dylib provides version 16.0.0 - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
/Users/vvdpzz/mayday/Rakefile:4
(See full trace by running task with --trace)

What should I do?
How to fix that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

可爱暴击 2024-10-22 03:52:14

尝试这样:
sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib ~/.rvm/gems/ruby-1.8.7/gems/mysql2-0.2.6/lib/mysql2/mysql2。捆

try like this:
sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib ~/.rvm/gems/ruby-1.8.7/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文