gem安装mysql2 -v '0.3.18'失败。

时间:2022-11-09 00:16:07

I'm using OS X 10.9.5. Recently updated ruby to 2.2.1 and it messed up everything in my system. I'm having a hard time with this. I'm trying to do a bundle install on my project and it fails saying

我用的是OS X 10.9.5。最近更新的ruby到2.2.1,它把我系统中的一切都搞砸了。我在这方面有困难。我试图在我的项目上安装一个捆绑包,但是失败了。

Make sure that gem install mysql2 -v '0.3.18' succeeds before bundling

I was going through the same issue yesterday. All I did was to uninstall mysql and reinstall it, then re install mysql2 and it worked. I', trying the same thing now but it wouldn't let me install mysql2.

昨天我也遇到了同样的问题。我所做的就是卸载mysql并重新安装它,然后重新安装mysql2,它就成功了。我现在也在尝试,但它不会让我安装mysql2。

I tried,

我试过了,

gem install mysql2 'gem install mysql2 -v '0.3.18'

Also Tried,

也试过了,

gem install mysql2 -v '0.3.18' -- --with-mysql-dir=/usr/local/bin/mysql

It gives me the following error, LInk to the error.

它给了我以下错误,链接到错误。

I'm thinking if this could be a gcc issue. when I run which gcc it gives me gcc: aliased to /usr/local/bin/cpp-4.8. could this be the reason?

我想如果这可能是海湾合作委员会的问题。当我运行该gcc时,它给了我gcc:别名为/usr/local/bin/cpp-4.8。这就是原因吗?

can anyone guide me in fixing this? thanks in advance

有人能指导我解决这个问题吗?谢谢提前

1 个解决方案

#1


2  

I got the same errors when I deploy my app to VPS(Ubuntu 14.04)

当我将我的应用程序部署到VPS(Ubuntu 14.04)时,我也犯了同样的错误。

What I did to make it out is

我所做的就是!

sudo apt-get install libmysqlclient-dev

sudo apt-get安装libmysqlclient-dev

Not sure for OS X , but hope this can help you.

不确定OS X,但希望这能帮助您。

#1


2  

I got the same errors when I deploy my app to VPS(Ubuntu 14.04)

当我将我的应用程序部署到VPS(Ubuntu 14.04)时,我也犯了同样的错误。

What I did to make it out is

我所做的就是!

sudo apt-get install libmysqlclient-dev

sudo apt-get安装libmysqlclient-dev

Not sure for OS X , but hope this can help you.

不确定OS X,但希望这能帮助您。