Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to build an ape server on Centos 5.6 but getting the following message:

/usr/bin/ld: cannot find -lmysqlclient_r collect2: ld returned 1 exit status make: * [modules] Error 1

How can I get it working? I've found libmysqlclient_r.so in /usr/lib64/mysql and /usr/lib/mysql/ are these the files it needs? If so, how can i get ld to see them?

share|improve this question

2 Answers 2

To make this work, you must edit the Makefile in the modules directory. On line 7 change

    MYSQL_FLAGS = -L./deps/mysac/ -I./deps/mysac/ -lmysac -lmysqlclient_r

to

    MYSQL_FLAGS = -L./deps/mysac/ -L/usr/lib64/mysql -I./deps/mysac/ -lmysac -lmysqlclient_r
share|improve this answer

You probably need to install the -devel RPM for MySQL.

To see whether that's available, try:

yum provides '*/libmysqlclient_r.so'

If for some reason it's not been seen, you can try:

LD_LIBRARY_PATH=/usr/lib64/mysql make
share|improve this answer
    
I already have it installed under mysql-devel! –  Paul Jun 9 '11 at 22:12
    
try the command above to see if it helps. –  Philip Reynolds Jun 9 '11 at 22:14
    
no, still the same response –  Paul Jun 10 '11 at 7:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.