2012.01.28 17:02
     

우분투에서 루비 온 레일즈를 이용해서 이것 저것 삽질하고 있습니다. ^^;;;; 아무래도 처음하다보니 이것저것 문제가 많은데요. 이번에는 만든 예제를 릴리즈하려고 bundle package를 하다보니 mysql2 관련 오류를 만났습니다. ㅠㅠ

kkamagui@kkamagui-VirtualBox:~/project/blog$ sudo gem install mysql2 -v '0.3.11'Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.8 extconf.rb
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... no
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... 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... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... 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/ruby1.8
        --with-mysql-config
        --without-mysql-config
        --with-mysql-dir

역시나 해결책은 구글신이 알려주셨습니다. ㅠㅠ 구글신 쵝오 ㅠㅠ)-b (http://railsforum.com/viewtopic.php?id=40776)
아래처럼 libmysqlclient-dev 패키지를 설치하면 깔끔하게 해결됩니다.

sudo apt-get install libmysqlclient-dev

아흑... 뭐라도 하나 제대로 되야할텐데... 쉽지 않네요 ㅠㅠ

Mittm

Android App

Posted by kkamagui

댓글을 달아 주세요