Ubuntu 12.04 , 64 bit version. mysql-client,mysql-server,libmysqlclient-dev all are installed. But libmysqlclient_r.so was not present in this path :
dhruvpathak@dhruvpathak:/usr/lib/x86_64-linux-gnu$ ll *mysql* -rw-r--r-- 1 root root 5075482 Aug 5 22:53 libmysqlclient.a lrwxrwxrwx 1 root root 20 Aug 5 22:53 libmysqlclient.so -> libmysqlclient.so.18 lrwxrwxrwx 1 root root 24 Aug 5 22:53 libmysqlclient.so.18 -> libmysqlclient.so.18.0.0 -rw-r--r-- 1 root root 3806568 Aug 5 22:53 libmysqlclient.so.18.0.0
While installing MySQLdb-python through pip, I kept on encountering this error :
/usr/include/python2.7/pyconfig.h:890:0: note: this is the location of the previous definition gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r -lpthread -lz -lm -lrt -ldl -o build/lib.linux-x86_64-2.7/_mysql.so /usr/bin/ld: cannot find -lmysqlclient_r
As you can see, directory path was correct
/usr/lib/x86_64-linux-gnu but thread safe version of file
libmysqlclient_r.so was not present.
Though I was able to install MySQL-python by setting threadSafe = False in site.cfg . How can I install it with threadsafe = true, and get libmysqlclient_r.so file in my mysql installation ?