Compiling error

Peter

Verified User
Joined
Jan 15, 2004
Messages
97
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status

Anyone has a clue how i can solve this?
 
Hello,

Make sure you have all mysql packages installed.

You need:
MySQL-client
MySQL-devel
MySQL-server

You can check for them by typing:
Code:
rpm -qa | grep MySQL
If they arn't there, go into /usr/local/directadmin/scripts/packages and use "rpm -ivh filename.rpm" to install whichever isn't there.

John
 
[root@shell root]# rpm -qa | grep MySQL
MySQL-client-4.0.14-0
MySQL-server-4.0.14-0
MySQL-devel-4.0.14-0

And it doesn't work
 
/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient.la
/usr/lib/mysql/libmysqlclient_r.a
/usr/lib/mysql/libmysqlclient_r.la
 
Hello,

Make sure that you have mysql library path in /etc/ld.so.conf and run "ldconfig" to recompile the library listing.

Code:
[root@server]# cat /etc/ld.so.conf
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/qt-2.3.1/lib
/usr/local/lib/libmcrypt
[b]/usr/lib/mysql[/b]
/usr/local/lib
and then run "ldconfig"

John
 
Hello,

Try installing the MySQL-shared rpm.
You can find it here:
http://files.directadmin.com/services/7.2/MySQL-shared-4.0.23-0.i386.rpm
Code:
wget http://files.directadmin.com/services/7.2/MySQL-shared-4.0.23-0.i386.rpm
rpm -ivh MySQL-shared-4.0.23-0.i386.rpm
John
 
Back
Top