{"id":762,"date":"2012-11-09T18:57:04","date_gmt":"2012-11-09T09:57:04","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=762"},"modified":"2012-11-09T18:57:32","modified_gmt":"2012-11-09T09:57:32","slug":"gem-install-mysql2-%e3%81%a7%e3%82%a8%e3%83%a9%e3%83%bc-2","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=762","title":{"rendered":"gem install mysql2 \u3067\u30a8\u30e9\u30fc"},"content":{"rendered":"<p>gem install mysql2 \u3067\u4e0b\u8a18\u306e\u30a8\u30e9\u30fc\u3002<\/p>\n<p>[bash]<br \/>\ngem install mysql2 -v &#8216;0.3.11&#8217;<br \/>\nBuilding native extensions.  This could take a while&#8230;<br \/>\nERROR:  Error installing mysql2:<br \/>\n        ERROR: Failed to build gem native extension.<\/p>\n<p>        \/usr\/local\/ruby193\/bin\/ruby extconf.rb<br \/>\nchecking for rb_thread_blocking_region()&#8230; yes<br \/>\nchecking for rb_wait_for_single_fd()&#8230; yes<br \/>\nchecking for mysql.h&#8230; no<br \/>\nchecking for mysql\/mysql.h&#8230; no<br \/>\n&#8212;&#8211;<br \/>\nmysql.h is missing.  please check your installation of mysql and try again.<br \/>\n&#8212;&#8211;<br \/>\n*** extconf.rb failed ***<br \/>\nCould not create Makefile due to some reason, probably lack of<br \/>\nnecessary libraries and\/or headers.  Check the mkmf.log file for more<br \/>\ndetails.  You may need configuration options.<\/p>\n<p>Provided configuration options:<br \/>\n        &#8211;with-opt-dir<br \/>\n        &#8211;without-opt-dir<br \/>\n        &#8211;with-opt-include<br \/>\n        &#8211;without-opt-include=${opt-dir}\/include<br \/>\n        &#8211;with-opt-lib<br \/>\n        &#8211;without-opt-lib=${opt-dir}\/lib<br \/>\n        &#8211;with-make-prog<br \/>\n        &#8211;without-make-prog<br \/>\n        &#8211;srcdir=.<br \/>\n        &#8211;curdir<br \/>\n        &#8211;ruby=\/usr\/local\/ruby193\/bin\/ruby<br \/>\n        &#8211;with-mysql-config<br \/>\n        &#8211;without-mysql-config<\/p>\n<p>Gem files will remain installed in \/usr\/local\/ruby193\/lib\/ruby\/gems\/1.9.1\/gems\/mysql2-0.3.11 for inspection.<br \/>\nResults logged to \/usr\/local\/ruby193\/lib\/ruby\/gems\/1.9.1\/gems\/mysql2-0.3.11\/ext\/mysql2\/gem_make.out<br \/>\n[\/bash]<\/p>\n<p>\u3069\u3046\u3084\u3089\u3001mysql.h is missing \u3068\u306e\u3053\u3068\u3002<br \/>\n\u3067\u3082\u3001yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fmysql\u306b\u306f\u3001\u3069\u3046\u3057\u3066\u3082 mysql.h \u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3002<\/p>\n<p>\u3069\u3046\u3084\u3089\u3001\u4e0b\u8a18\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u5fc5\u8981\u306a\u3088\u3046\u3067\u3042\u3063\u305f\u3002<br \/>\nmysql55-devel<br \/>\n[bash]<br \/>\n yum &#8211;enablerepo=ius,epel install mysql55-devel<br \/>\nLoaded plugins: fastestmirror<br \/>\nLoading mirror speeds from cached hostfile<br \/>\n * base: ftp.oss.eznetsols.org<br \/>\n * epel: ftp.iij.ad.jp<br \/>\n * extras: ftp.oss.eznetsols.org<br \/>\n * ius: archive.linux.duke.edu<br \/>\n * updates: ftp.oss.eznetsols.org<br \/>\nSetting up Install Process<br \/>\nResolving Dependencies<br \/>\n&#8211;&gt; Running transaction check<br \/>\n&#8212;&gt; Package mysql55-devel.x86_64 0:5.5.28-2.ius.el5 set to be updated<br \/>\n&#8211;&gt; Finished Dependency Resolution<\/p>\n<p>Dependencies Resolved<\/p>\n<p>=====================================================================================================<br \/>\n Package                    Arch                Version                       Repository        Size<br \/>\n=====================================================================================================<br \/>\nInstalling:<br \/>\n mysql55-devel              x86_64              5.5.28-2.ius.el5              ius              190 k<\/p>\n<p>Transaction Summary<br \/>\n=====================================================================================================<br \/>\nInstall       1 Package(s)<br \/>\nUpgrade       0 Package(s)<\/p>\n<p>Total download size: 190 k<br \/>\nIs this ok [y\/N]: y<br \/>\nDownloading Packages:<br \/>\nmysql55-devel-5.5.28-2.ius.el5.x86_64.rpm                                     | 190 kB     00:00<br \/>\nRunning rpm_check_debug<br \/>\nRunning Transaction Test<br \/>\nFinished Transaction Test<br \/>\nTransaction Test Succeeded<br \/>\nRunning Transaction<br \/>\n  Installing     : mysql55-devel                                                                 1\/1<\/p>\n<p>Installed:<br \/>\n  mysql55-devel.x86_64 0:5.5.28-2.ius.el5<\/p>\n<p>Complete!<br \/>\n[\/bash]<\/p>\n<p>\u518d\u3073\u3001gem install mysql2\u3002<br \/>\n[bash]<br \/>\n gem install mysql2 -v &#8216;0.3.11&#8217;<br \/>\nBuilding native extensions.  This could take a while&#8230;<br \/>\nSuccessfully installed mysql2-0.3.11<br \/>\n1 gem installed<br \/>\nInstalling ri documentation for mysql2-0.3.11&#8230;<br \/>\nInstalling RDoc documentation for mysql2-0.3.11&#8230;<br \/>\n[\/bash]<\/p>\n<p>\u4e0a\u624b\u304f\u3044\u3063\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>gem install mysql2 \u3067\u4e0b\u8a18\u306e\u30a8\u30e9\u30fc\u3002 [bash] gem install mysql2 -v &#8216;0.3.11&#8217; Building native extensions. This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[11,25,14,4],"tags":[],"class_list":["post-762","post","type-post","status-publish","format-standard","hentry","category-mysql","category-rails","category-ruby","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=762"}],"version-history":[{"count":3,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/762\/revisions"}],"predecessor-version":[{"id":765,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/762\/revisions\/765"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}