[英]Can't install mysql gem on windows 7
I'm trying to install the mysql gem under Windows 7 x64. 我正在尝试在Windows 7 x64下安装mysql gem。 Ruby -v is ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32] and gem is 1.3.4.
Ruby -v是ruby 1.8.6(2009-03-31 patchlevel 368)[i386-mingw32],gem是1.3.4。 So the problem is, when I try to "gem install mysql", I get the following error:
所以问题是,当我尝试“ gem install mysql”时,出现以下错误:
D:\ruby\lib\ruby\gems\1.8\gems\mysql-2.7>gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
D:/ruby/bin/ruby.exe extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
I've tried to add the mysql bin to the PATH as described here , it didn't help just as adding different variations of --with-mysql (-dir, -lib etc.) to the instruction. 我试图按照此处的描述将mysql bin添加到PATH中,但并没有像在指令中添加--with-mysql的不同变体(-dir,-lib等)那样有用。 How can I finally fix it?
我最终如何解决? TIA
TIA
I don't think that the mysql gem has been released for the mingw32 build of Ruby yet, although there definitely seems to be something coming on that front. 我认为还没有针对mingw32构建的Ruby发布mysql gem,尽管这方面似乎确实有一些问题 。
More significantly, the one-click installer is not production on mingw32 yet at all, although it's getting there, and the biggest outstanding item is getting all compiled gems to compatibility. 更重要的是,尽管一键安装程序已经安装在mingw32上,但它根本没有在mingw32上生产,并且最大的优点是使所有编译的gem都具有兼容性。
You can either try putting together a mingw32-gcc build environment and trying to build the library yourself or drop back to the 1.8.6 mswin32 installer and runtime for now and monitor the one-click installer 's progress. 您可以尝试将mingw32-gcc构建环境放在一起并尝试自己构建库,或者暂时回到1.8.6 mswin32安装程序和运行时并监视一键式安装程序的进度。
Unless someone else knows different, of course? 当然,除非其他人知道不同?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.