gpt4 book ai didi

MySQL Ruby Gem 安装问题

转载 作者:可可西里 更新时间:2023-11-01 07:57:26 24 4
gpt4 key购买 nike

所以我知道这个问题之前有人问过,而且我翻遍了之前所有的答案仍然找不到解决方案。希望大家能帮忙。

设置:我正在运行 Mac OS X 10.6 Server。我在网络应用程序上使用了内置的 MySQL 安装,效果很好。现在我正在尝试运行需要 MySQL 的 RoR 应用程序。

所以,每当我进入

gem install mysql

它吐出以下错误:

Building native extensions.  This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/Users/admin/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb --with-mysql-config=/var/mysql
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/admin/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
--with-mysql-config
extconf.rb:35:in ``': Permission denied - /var/mysql --cflags (Errno::EACCES)
from extconf.rb:35:in `<main>'


Gem files will remain installed in /Users/admin/.rvm/gems/ruby-1.9.2-p180@rails3/gems/mysql-2.8.1 for inspection.
Results logged to /Users/admin/.rvm/gems/ruby-1.9.2-p180@rails3/gems/mysql- 2.8.1/ext/mysql_api/gem_make.out

因此,通过我的研究,我试图具体说明 MySQL 安装的位置。

gem install mysql -- --with-mysql-config=/var/mysql

不幸的是,结果相同。

从这里开始有什么想法吗?

谢谢!

凯文

最佳答案

凯文,

这篇文章可以帮助您解决您的问题:

http://rapd.wordpress.com/2007/05/17/battle-against-ror-gem-install-mysql/

关于MySQL Ruby Gem 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5607247/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com