首页 > 系统 > Linux > 正文

Ubuntu7.10安装gem install mysql时出错的解决

2024-08-28 00:11:24
字体:
来源:转载
供稿:网友

问题:在Ubuntu7.10中,使用
Java代码
sudo gem install mysql 

sudo gem install mysql
出现:
Java代码
ERROR:  While executing gem ... (RuntimeError)  
    ERROR: Failed to build gem native extension.  
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mys 

ERROR:  While executing gem ... (RuntimeError)
    ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mys


解决方案
1.先运行
Java代码
$ sudo apt-get install libmysqlclient15-dev 

$ sudo apt-get install libmysqlclient15-dev

注意上面安装的库名为libmysqlclient15-dev而非libmysqlclient5-dev

2.再运行
Java代码
sudo gem install mysql 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表