面对错误安装mysql2宝石 [英] Facing error installing mysql2 gem

查看:180
本文介绍了面对错误安装mysql2宝石的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Rails让我用gem install mysql2取得成功,并试图获得以下错误。那么这种错误最主要的问题是什么?错误细节如下:
由于某种原因无法创建Makefile,可能缺少
必需的库和/或头文件。查看mkmf.log文件以获取更多
的详细信息。您可能需要配置选项。

 提供的配置选项:
--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 = / usr / local / bin / ruby​​
--with-mysql-config
--without-mysql-config
- -with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include = $ {mysql-dir} / include
--with-mysql-lib
--without-mysql-lib = $ {mysql-dir} / lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without- zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mygcclib
--without-mygcclib
--with-mysqlclientlib
--without-mysqlclientlib


Gem文件将保持安装在/ usr / local / lib / ruby​​ / gems / 1.9.1 / gems / mysql2-0.3.7进行检查。
结果记录到/usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.3.7/ext/mysql2/gem_make.out

这个错误发生在

  sudo gem install mysql2 

安装mysql有没有问题?请告诉任何你知道的事情,我非常感谢你花时间阅读我的问题。



谢谢

解决方案

这应该可以解决您的问题

pre $ sudo apt-get install libmysqld-dev libmysqlclient-dev mysql-client

gem install mysql2


Rails ask me to succeed with gem install mysql2 and on trying I got the following error.So what is mostly problem with such error? Detail of error is below: 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=/usr/local/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mygcclib
--without-mygcclib
--with-mysqlclientlib
--without-mysqlclientlib


    Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.3.7 for  inspection.
   Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.3.7/ext/mysql2/gem_make.out

This error occured in the result of

       sudo gem install mysql2

Is there any problem in installation of mysql? Please tell whatever you know about that, I really appreciate your spent time on reading my question.

thanks

解决方案

This should solve your problem

sudo apt-get install libmysqld-dev libmysqlclient-dev mysql-client

gem install mysql2

这篇关于面对错误安装mysql2宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆