Installing mysql (2.8.1) with native extensions /usr/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)/usr/local/bin/ruby extconf.rb checking for mysql_query() in -lmysqlclient... nochecking for main() in -lm... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lz... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lsocket... nochecking for mysql_query() in -lmysqlclient... nochecking for main() in -lnsl... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lmygcc... nochecking for mysql_query() in -lmysqlclient... no*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack ofnecessary libraries and/or headers. Check the mkmf.log file for moredetails. 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
解决办法:
sudo apt-get install libmysqlclient15-dev