Support Requests: Browse | Submit New | Admin

[#29573] Cannot install mysql gem in linux, please help

Date:
2012-05-17 04:19
Priority:
3
Submitted By:
Pok Lau (pokman0742)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Cannot install mysql gem in linux, please help

Detailed description
Trying to install in linux and appears ruby not able to find the library. How can I overcome the problem?

[root@machine redmine]$ gem install mysql -v '2.8.1' -- --with-mysql-lib=/usr/lib64/mysql/
--with-mysql-include=/usr/include/mysql/
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

        /usr/local/bin/ruby extconf.rb --with-mysql-lib=/usr/lib64/mysql/ --with-mysql-include=/usr/include/mysql/
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... yes
creating Makefile

make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I. -DHAVE_MYSQL_H    -I/usr/include/mysql -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -fPIC -g -static-libgcc
-fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1 -fPIC -g -O2   -c mysql.c
gcc -shared -o mysql_api.so mysql.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L.  -rdynamic -Wl,-export-dynamic   
-L/usr/lib64 -lmysqlclient -lpthread -lm -lrt -ldl  -lrt -ldl -lcrypt -lm   -lc
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [mysql_api.so] Error 1


Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item