Unsolved libmysqlclient.so.18 is missing
-
Hello, I'm trying to make an server application on linux, I made it on my local machine with installed Qt and it works, I use linuxdeploytool and it says I'm missing libmysqlclient.so.18, but I uploaded the app to my server, it's running but it doesn't access database (it just says I'm missing plugin).
I've tried to apt-get mysql, mysql-dev and other simillar as I found on other forums, but it does nothing, I'm still missing it. Some people says I have to compile qt, but it makes no sense to compile whole big Qt framework to get just one plugin. I was looking for the lib in usr/lib, /usr/local/lib, /lib, qt/lib, also qt/plugins/ and sadly I can't find it.
-
http://imgur.com/xpzd9vEl.png That's how my application logs looks like when trying to access database
-
@orzel1244 please be aware that the image you posted says "QSQLITE driver not loaded" Are you sure you're effectively using a MySQL connection/DB as backend?
-
@Pablo-J.-Rogina I'm using sqlite
-
@orzel1244 said in libmysqlclient.so.18 is missing:
I use linuxdeploytool and it says I'm missing libmysqlclient.so.18
It looks like you're referencing MySQL somehow which is not really needed, and you're missing to reference/include Sqlite which you indeed want to use.
-
@orzel1244 said in libmysqlclient.so.18 is missing:
linuxdeploytool
If you are actually using this linuxdeployqt tool, please take a look at this issue.
-
@Pablo-J.-Rogina It doesn't help me
-
Hi,
You likely have have MySQL version 20 if you have a recent Linux distribution.
But since you are not using MySQL with your application. Why not just ignore that warning ?
What do you get if you call
ldd
on the Qt SQLite plugin ? -
https://pastebin.com/ipHUP0j5 <- logs from linuxdeployqt
-
@SGaist said in libmysqlclient.so.18 is missing:
Why not just ignore that warning ?
Because the warning doesn't allow me to access my sqlite database
ldd on the plugin gives me:
https://pastebin.com/7Vs9bSB0 -
Looks like there's a missing feature to disable unused SQL plugins for linuxdeployqt.
Then you should consider re-building the MySQL plugin against the version you installed on your system.
-
I'm still getting error while trying to compile Qt from sources, I think it's too hard for me and it's better to use other lib for database :/
-
Then as a quick work around:
- Make a copy your sqldrivers folder.
- Remove all plugins in the original folder except the one you use.
- Re-run
linuxdeployqt
-
You want me to copy sqldrivers from Qt dir to the application dir or what? I'm sorry I don't understand what you meant
-
No, make a copy of the sqldrivers folder from the Qt installation you used to build your application. So you keep all the original files safe. Then in the original folder from your Qt installation, delete all the non SQLite related files. Doing so,
linuxdeployqt
will only deploy the SQLite driver. Once your done, just delete the modified sqldrivers folder and put back the copy you made just before.