QSqlDatabase: QMYSQL driver not loaded problem under qt5.5 in ubuntu14

62 篇文章 0 订阅
2 篇文章 0 订阅

the error looks like:

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7

let's find out the solution step by step:


1. open terminal, turn to sqldrivers directory, here ours is:

/opt/Qt5.5.1/5.5/gcc_64/plugins/sqldrivers

2. find out what libqsqlmysql.so depends on by typing:

ldd libqsqlmysql.so

then, if you find something not found, then you need to solve, here are something not found in our case:

libmysqlclient_r.so.16 => not found

libssl.so.10 => not found
libcrypto.so.10 => not found

3. solve libmysqlclient_r.so.16 => not found


This part cost me most of time.

first, we need to download libmysqlclient.so.16 from http://files.directadmin.com/services/debian_5.0_64/libmysqlclient.so.16

then put it into /usr/lib/x86_64-linux-gnu,

after that we copy it and rename as libmysqlclient_r.so.16



4. solve  libssl.so.10 => not found  and  libcrypto.so.10 => not found


Lets make sure that you have your SSL installed and updated:

sudo apt-get update
sudo apt-get install libssl1.0.0 libssl-dev

Now lets fix the naming of the file by creating a link:

cd /lib/x86_64-linux-gnu
sudo ln -s libssl.so.1.0.0 libssl.so.10
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10

And finally, lets inform the developer about this flaw so he can fix it :)


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值