在Ubuntu上安装mysql gem的困难

我试图安装MysqL 2.8.1 gem。我将使用它来在Ubuntu 10.04上构建一个Rails 2.0.2应用程序。我将使用Ruby 1.8.7。我已经安装了开发依赖(其他gems)。由于某些原因,我无法安装它。我不能完全弄清楚如何解决它。请帮忙!!

我得到以下在终端中,当我尝试安装它:

mohnish@pc146724-desktop:~/Downloads$ sudo gem install MysqL-2.8.1.gem 
Building native extensions.  This Could take a while...
ERROR:  Error installing MysqL-2.8.1.gem:
    ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for MysqL_query() in -lMysqLclient... no
checking for main() in -lm... yes
checking for MysqL_query() in -lMysqLclient... no
checking for main() in -lz... yes
checking for MysqL_query() in -lMysqLclient... no
checking for main() in -lsocket... no
checking for MysqL_query() in -lMysqLclient... no
checking for main() in -lnsl... yes
checking for MysqL_query() in -lMysqLclient... no
checking for main() in -lmygcc... no
checking for MysqL_query() in -lMysqLclient... no
*** extconf.rb Failed ***
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/bin/ruby1.8
    --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/lib/ruby/gems/1.8/gems/MysqL-2.8.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/MysqL-2.8.1/ext/MysqL_api/gem_make.out
mohnish@pc146724-desktop:~/Downloads$

谢谢你的帮助!!

尝试这个,然后安装MysqL gem:
sudo apt-get install libMysqLclient-dev

如果这不够充分尝试这样

sudo apt-get install libMysqLclient-dev libMysqLclient16 ruby-dev

相关文章

ubuntu退出redis的示例:指定配置文件方式启动源码redis:roo...
ubuntu中mysql改密码忘了的解决方法:1.在终端中切换到root权...
ubuntu安装mysql失败的解决方法原因:可能是原有的MySQL还有...
使用centos和ubuntu建站的区别有以下几点1.CentOS是Linux发行...
ubuntu图形界面和字符界面切换的方法:可以通过快捷键CTRL+A...
ubuntu中重启mysql失败的解决方法1.首先,在ubuntu命令行中,...