Error Installing Mysql Gem Extconf.rb Failed
Contents |
here for a quick overview of the site gem install mysql ubuntu Help Center Detailed answers to any questions you might gem install mysql failed to build gem native extension have Meta Discuss the workings and policies of this site About Us Learn more error: failed to build gem native extension. mysql2 about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
Extconf.rb Failed Mysql2
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up gem install mysql fail up vote 9 down vote favorite 2 ruby install mysql I've followed the instructions on http://geryit.com/blog/2011/01/installing-mysql-with-rails-on-mac-os-x-snow-leopard/ , including the installation of ruby via macport. Whenever I execute gem install mysql , I'll get the following error bash-3.2# gem install mysql Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /opt/local/bin/ruby extconf.rb checking for mysql_ssl_set()... no checking for rb_str_set_len()... no checking for rb_thread_start_timer()... no checking for mysql.h... no checking for mysql/mysql.h... 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 --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=/opt/local/bin/ruby --with-mysql-config --without-mysql-config Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection. Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out How can I resolve this is
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: Ruby :: MySQL gem Installation Problems New Topic could not create makefile due to some reason windows Advanced Search MySQL gem Installation Problems Posted by: Gianni Chiappetta ()
Ruby Mysql Example
Date: October 17, 2007 08:40PM I am trying to install the rubygems native mysql gem,
Checking For Mysql_query() In -lmysqlclient... No
but I am getting these errors. I have searched the internet and found similar problems but none of the solutions have worked for me. Here is http://stackoverflow.com/questions/5795309/gem-install-mysql-fail what I am doing: root@server # gem install mysql -- --with-mysql-lib=/usr/local/mysql/lib Need to update 1 gems from http://gems.rubyforge.org . complete Select which gem to install for your platform (i486-linux) 1. mysql 2.7.3 (mswin32) 2. mysql 2.7.1 (mswin32) 3. mysql 2.7 (ruby) 4. mysql 2.6 (ruby) 5. Skip this gem 6. Cancel http://forums.mysql.com/read.php?116,178217,178217 installation > 3 Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install mysql -- --with-mysql-lib=/usr/local/mysql/lib checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... no 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... 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/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=${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-mysq
have one accepted answer. Are you sure you want to replace the current answer with this one? Yes, I'm sure. Changed your mind? You previously marked this answer as accepted. Are you sure you want to unaccept it? Yes, https://www.digitalocean.com/community/questions/gem-install-mysql2-failed-on-on-ubuntu-14-04 I'm sure. Sign Up Log In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean http://blog.bmn.name/2008/02/rails-gem-install-mysql-throws-error-extconfrb-failed/ Community Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In submit View All Results By: lucashesg Subscribe Subscribed Share 0 gem install mysql2 failed on on Ubuntu 14.04 September 10, 2014 15.1k views ~# gem install mysql2 Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb Gem install mysql files will remain installed in /usr/local/rvm/gems/ruby-2.0.0-p353/gems/mysql2-0.3.16 for inspection. I google and tried the below but still the same error. Pleas help! Thank you! sudo apt-get install mysql-client libmysqlclient-dev 2 comments 0 wavrin September 10, 2014 Maybe run this update first: sudo gem update --system 0 abe.petrillo September 10, 2014 Might be worth upgrading ruby to 2.1.2, I heard it's a bit more stable. Is there no more output? Also with checking if you have make: apt-get gem install mysql install make Log In to Comment Leave a Comment Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below. Log In to Comment 6 Answers 3 asb MOD September 10, 2014 It looks like you are probably missing something needed to compile the mysql2 gem's C extension. Try installing the following packages: sudo apt-get install build-essential libmysqlclient-dev Reply Log In to Comment 0 lucashesg September 10, 2014 Hi wavrin, asb, thanks for your answer. However, I still have the same error after running your commands. would appreciate if anyone can give suggestion on how to setup mysql2 on Ubuntu 14.04. It is a new droplet that i just created yesterday. I guess you can reproduce this by creating a new temporary droplet Ubuntu 14.04 with ruby and rails Reply Log In to Comment 0 bonnet.benjamin November 21, 2014 thanks for the tips Reply Log In to Comment 0 Thelastinuit January 16, 2015 sudo apt-get install mysql-server libmysqlclient-dev Works for me. Reply Log In to Comment 0 kradllit April 11, 2015 Also need to install ruby2.*-dev Reply Log In to Comment 0 romariolopezc June 29, 2015 sudo apt-get install build-essential libmysqlclient-dev works for me! thanks Reply Log In to Comment Have another answer? Share your knowledge. Log In to Answer Copyright © 2016 DigitalOcean™ Inc. Commu
gem install mysql throws error: *** extconf.rb failed *** Posted on February 17, 2008 by bmn Tweet Whilst reading guides on how to setup a rails dev server under OS X (both Tiger and Leopard), I kept running into issues installing the mysql gem. The guides would instruct you to install the mysql client libraries from the mysql website, which is fine. But to get improved performance under rails, you must install the mysql gem, but in doing so, I would constantly run into issues getting the gem to install correctly. The issues normally arises after running the following command: sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql And the resulting error is: 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. Basically, the gem compile fails as a result of not knowing where the correct mysql files are, despite the fact that the command line switch points to the mysql folder. To fix this problem, use a line like the following: sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config Note that instead of pointing at the mysql folder, we are pointing at a mysql config which is bundled with the mysql client install files. This entry was posted in how-to, software, technical and tagged gem, mysql, rails, ruby, ruby on rails, solution by bmn. Bookmark the permalink. Logging In... Profile cancel Sign in with Twitter Sign in with Facebook or Name EmailNot published Website Comment 52 Replies 47 Comments 0 Tweets 0 Facebook 4 Pingbacks Last reply was February 4, 2014 WEBデザイン Tips View April 11, 2008 Leopard MacbookにMySQLをイン