バージョンアップのたびに、何度もハマる。
今回は、WindowsXP + ruby2.0 + mysql5.5
おなじみ下記のエラー。
checking for main() in -llibmysql... 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=C:/usr/local/ruby200/bin/ruby --with-mysql-dir --without-mysql-dir --with-mysql-include=${mysql-dir}/include --with-mysql-lib=${mysql-dir}/ --with-mysql-dir --without-mysql-dir --with-mysql-include=${mysql-dir}/include --with-mysql-lib=${mysql-dir}/lib --with-libmysqllib --without-libmysqllib
C:\>gem install mysql2 -- '--with-mysql-include="C:\Program Files\MySQL\MySQL Server 5.5\include" --with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5.5\lib"' Temporarily enhancing PATH to include DevKit... Building native extensions with: '--with-mysql-include="C:\Program Files\MySQL\MySQL Server 5.5\incl ude" --with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5.5\lib"' This could take a while... Successfully installed mysql2-0.3.13 Parsing documentation for mysql2-0.3.13 unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/mysql2/mysql2.so, skipping Installing ri documentation for mysql2-0.3.13 1 gem installed
毎回、gem install の引数の渡し方が良くない。シングルクウォートで囲う。
Pingback: Whoocus » Blog Archive » gem install mysql2 のインストールエラー