当 MySQL 在 OS X Lion 上通过自制程序安装时,如何安装 mysql2 gem?

发布于 2024-11-30 16:07:39 字数 2215 浏览 0 评论 0原文

我无法在 OS X Lion 上通过自制程序安装 MySQL 并安装 mysql2 gem。我在安装时尝试了多种标志,但仍然没有运气。以下是所有详细信息。

软件 Mac OS X Lion 10.7 (11A2063)

$ uname -a

Darwin Greenwood.local 11.0.1 Darwin 内核版本 11.0.1:6 月 29 日星期三 19:53 :2011 年太平洋夏令时间 22 日; root:xnu-1699.23.2~1/RELEASE_X86_64 x86_64

$ 其中 gcc | xargs ls -l

lrwxr-xr-x 1根轮 12 Aug 18 14:09 /usr/bin/gcc -> llvm-gcc-4.2

$brew info mysql

mysql 5.5.14

$which mysql

/usr/local/bin /mysql

$ which mysql_config

/usr

/local/bin/mysql_config $ ls -l /usr/local/bin/mysql*

<代码>$ ls -l /usr/local/lib/libmysql*

查看此要点中的输出: https://gist .github.com/1158628

$ sudo gem install mysql2

请参阅此要点中的输出:https://gist.github.com/1158612

$ sudo find / -name mysql.h

/usr/local/Cellar/mysql/ 5.5.14/include/mysql.h

/usr/local/include/mysql.h

$ /usr/local/bin/mysql_config

请参阅此中的输出要旨: https://gist.github.com/1158625

$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql2 -- --with-mysql-config=/usr/local/bin/mysql_config

请参阅此要点中的输出:https://gist.github.com/1158618

$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql2 -- --with-mysql-dir=/usr/local

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

请参阅此要点中的输出: https://gist.github.com/1158645

我也尝试过这个答案: OSX 10.7 Lion 上的 MySQL gem

感谢您的帮助!

I've been unable to install the mysql2 gem with MySQL installed via homebrew on OS X Lion. I've tried a multitude of flags with the install, and I've still had no luck. Here are all the details.

Software Mac OS X Lion 10.7 (11A2063)

$ uname -a

Darwin Greenwood.local 11.0.1 Darwin Kernel Version 11.0.1: Wed Jun 29 19:53:22 PDT 2011; root:xnu-1699.23.2~1/RELEASE_X86_64 x86_64

$ which gcc | xargs ls -l

lrwxr-xr-x 1 root wheel 12 Aug 18 14:09 /usr/bin/gcc -> llvm-gcc-4.2

$ brew info mysql

mysql 5.5.14

$ which mysql

/usr/local/bin/mysql

$ which mysql_config

/usr/local/bin/mysql_config

$ ls -l /usr/local/bin/mysql*

$ ls -l /usr/local/lib/libmysql*

See output in this gist: https://gist.github.com/1158628

$ sudo gem install mysql2

See output in this gist: https://gist.github.com/1158612

$ sudo find / -name mysql.h

/usr/local/Cellar/mysql/5.5.14/include/mysql.h

/usr/local/include/mysql.h

$ /usr/local/bin/mysql_config

See output in this gist: https://gist.github.com/1158625

$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql2 -- --with-mysql-config=/usr/local/bin/mysql_config

See output in this gist: https://gist.github.com/1158618

$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql2 -- --with-mysql-dir=/usr/local

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

See output in this gist: https://gist.github.com/1158645

I also tried this answer:
MySQL gem on OSX 10.7 Lion

Thanks for the help!

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

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

发布评论

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

评论(1

橙幽之幻 2024-12-07 16:07:39

我用 homebrew 卸载并重新安装了 MySQL,并且能够安装 gem。

I uninstalled and reinstalled MySQL with homebrew, and I was able to install the gem.

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