问题
I'm trying to follow the answer given in QSqlDatabase: QMYSQL driver not loaded on Ubuntu 15.04 64bits
on Xubuntu 16.04, where:
# ls /usr/lib/x86_64-linux-gnu/libmysql* -ls
5624 -rw-r--r-- 1 root root 5757198 Abr 21 10:30 /usr/lib/x86_64-linux-gnu/libmysqlclient.a
0 lrwxrwxrwx 1 root root 20 Abr 21 10:29 /usr/lib/x86_64-linux-gnu/libmysqlclient.so -> libmysqlclient.so.20
0 lrwxrwxrwx 1 root root 24 Abr 21 10:29 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20 -> libmysqlclient.so.20.2.1
4140 -rw-r--r-- 1 root root 4237408 Abr 21 10:30 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.2.1
Here there are no *_r
terminated files.
However, make
seems to search for *_r
terminated files:
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: error: ld returned 1 exit status
Makefile:111: recipe for target '../../../../plugins/sqldrivers/libqsqlmysql.so' failed
make: *** [../../../../plugins/sqldrivers/libqsqlmysql.so] Error 1
From What is difference between libmysqlclient.a and libmysqlclient_r.a? it seems just a link must be made between the two. Is this the correct approach? Should I do it manually like:
cd /usr/lib/x86_64-linux-gnu/
ln -s libmysqlclient.so.20.2.1 libmysqlclient_r.so.20.2.1
ln -s libmysqlclient.so.20 libmysqlclient_r.so.20
ln -s libmysqlclient.so libmysqlclient_r.so
ln -s libmysqlclient.a libmysqlclient_r.a
Or I'm missing some thing?
来源:https://stackoverflow.com/questions/37515236/qsqldatabase-qmysql-driver-not-loaded-on-xubuntu-16-04-64bits