2 messages in com.mysql.lists.mysqlRe: Problem with C Api..
FromSent OnAttachments
sin...@mysql.com17 Jan 2000 07:00 
Marcelo J. Iturbe17 Jan 2000 07:51 
Subject:Re: Problem with C Api..
From:sin...@mysql.com (sin@mysql.com)
Date:01/17/2000 07:00:49 AM
List:com.mysql.lists.mysql

Marcelo J. Iturbe writes:

Hello, I have a run-time problem with the Mysql libraries... I wrote a C program which compiles just fine using the following: gcc -o /apache/htdocs/cgi-bin/out.cgi in.c -L/usr/local/lib/mysql/ -lmysqlclient -L/usr/local/lib/ -lcgi-util The gcc version is gcc: egcs-2.91.66

When I try to run the program I get the following error error in loading shared libraries: libmysqlclient.so.6: cannot open shared object file: No such file or directory

However when I do locate libmysqlclient.so.6 I get the following as it should be... /usr/local/lib/mysql/libmysqlclient.so.6.0.0 /usr/local/lib/mysql/libmysqlclient.so.6 then I do ls -l and get... lrwxrwxrwx 1 root root 23 Jan 14 11:53 libmysqlclient.so -> libmysqlclient.so.6.0.0 lrwxrwxrwx 1 root root 23 Jan 14 11:53 libmysqlclient.so.6 -> libmysqlclient.so.6.0.0 -rwxrwxr-x 1 root root 92016 Jan 14 11:53 libmysqlclient.so.6.0.0

Any thoughts..

Hi!

What Unix are you using. If it is Linux or some BSD, edit /etc/ld.so.conf file and add in a new line with /usr/local/lib/mysql.

Then run ldconfig -v.

If it is some SysV Unix, like Solaris or SCO, you should add the above path into environment variable LD_PRELOAD_PATH or LD_LIBRARY_PATH, i forgot ;-(

Regards,

Sinisa