mysql2 ruby​​ gem安装错误

时间:2014-01-10 02:07:16

标签: mysql ruby-on-rails-3 ruby-on-rails-4 mysql2 mysql2psql-gem

运行此命令时出现以下错误,请帮忙 gem install mysql --platform = ruby​​ - --with-opt-dir = C:/ mysql-connect or -c-noinstall-6.1.3-winx64

Temporarily enhancing PATH to include DevKit...                     
Building native extensions with: '--with-opt-dir=C:/mysql-connector-
c-noinstall-6.1.3-winx64'                                           
This could take a while...                                          
ERROR:  Error installing mysql:                                     
    ERROR: Failed to build gem native extension.                

C:/Ruby200/bin/ruby.exe extconf.rb --with-opt-dir=C:/mysql-conne
ctor-c-noinstall-6.1.3-winx64                                       
checking for main() in -llibmysql... no                             
*** extconf.rb failed ***                                           
Could not create Makefile due to some reason, probably lack of neces
sary                                                                
libraries and/or headers.  Check the mkmf.log file for more details.
You may                                                           
need configuration options.                                         

Provided configuration options:                                     
    --with-opt-dir                                              
    --with-opt-include                                          
    --without-opt-include=${opt-dir}/include                    
    --with-opt-lib                                              
    --without-opt-lib=${opt-dir}/lib                            
    --with-make-prog                            
        --curdir                                                    
    --ruby=C:/Ruby200/bin/ruby                                  
    --with-mysql-dir                                            
    --without-mysql-dir                                         
    --with-mysql-include                                        
    --without-mysql-include=${mysql-dir}/include                
    --with-mysql-lib                                            
    --without-mysql-lib=${mysql-dir}/                           
    --with-libmysqllib                                          
    --without-libmysqllib                                       

extconf failed, exit code 1                                         

Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/ge
ms/mysql-2.9.1 for inspection.                                      
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-ming
w32/2.0.0/mysql-2.9.1/gem_make.out                                             

请问我该如何解决这个错误,我已经尝试了许多在线资源,例如下载mysql连接器但没有任何内容

0 个答案:

没有答案