错误:无法构建gem本机扩展-安装mysql2时出错 [英] ERROR: Failed to build gem native extension - Error installing mysql2

查看:122
本文介绍了错误:无法构建gem本机扩展-安装mysql2时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行捆绑软件安装时出错

error while running bundle install

Installing mysql2 (0.3.11) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
...
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.

我跑步时请确保gem install mysql2 -v '0.3.11'.我仍然遇到相同的错误.

when i run Make sure that gem install mysql2 -v '0.3.11'.I still get the same error.

推荐答案

您使用的是哪个操作系统?

which OS are you using?

无论如何,如果您正在使用ubuntu ,请从此 https://github.com/brianmario/mysql2/issues/8 运行:

anyway if you are using ubuntu, from this https://github.com/brianmario/mysql2/issues/8 run:

sudo apt-get install mysql-client libmysqlclient-dev


否则,对于 Mac用户,(使用brew安装)检查此 http://mxcl.github.com/homebrew/,或运行:


Otherwise for Mac users,(use brew to install) check this http://mxcl.github.com/homebrew/, or run:

brew install mysql

然后

sudo gem install mysql2


,对于 Windows用户,请查看下面的链接以获取解决方案. 安装mysql2时发生错误:无法构建gem本机扩展


and for windows users check the link below for a solution. Error installing mysql2: Failed to build gem native extension

我建议使用普通的命令提示符.

I would recommend to use the normal command prompt.

这篇关于错误:无法构建gem本机扩展-安装mysql2时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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