gem install mysql2 安装相关问题
1.情况1: "bundle install" command or "gem install mysql2" it gives me following error "Error installing mysql2: ERROR: Failed to build gem native extension."
解决方案: sudo apt-get install libmysql-ruby libmysqlclient-dev
gem install mysql2
2.情况2: 安装mysql时候 改变了安装目录,
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 > 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.
解决方案:sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
http://zool.it/posts/gem-install-mysql2-error
3. 以上两种组合
作者:
fandyst
出处: http://www.cnblogs.com/todototry/
关注语言: python、javascript(node.js)、objective-C、java、R、C++
兴趣点: 互联网、大数据技术、大数据IO瓶颈、col-oriented DB、Key-Value DB、数据挖掘、模式识别、deep learning、开发与成本管理
产品:
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。
出处: http://www.cnblogs.com/todototry/
关注语言: python、javascript(node.js)、objective-C、java、R、C++
兴趣点: 互联网、大数据技术、大数据IO瓶颈、col-oriented DB、Key-Value DB、数据挖掘、模式识别、deep learning、开发与成本管理
产品:
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。