参考:
https://blog.csdn.net/o___GRoot/article/details/111320313
https://blog.csdn.net/sksukai/article/details/105344308
我的解决步骤:
1. 指定qmake
qmake: could not exec ‘/usr/lib/x86_64-linux-gnu/qt4/bin/qmake’: No such file or directory
需要修改如下文件内容
/usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
从
/usr/lib/x86_64-linux-gnu/qt4/bin /usr/lib/x86_64-linux-gnu
修改为
/home/mike/Qt5.9.7/5.9.7/gcc_64/bin /usr/lib/x86_64-linux-gnu/qt4/bin /usr/lib/x86_64-linux-gnu
即指定qt安装目录下的qmake。
2. 编译源码
执行如下命令:
cd ~/Qt5.9.7/5.9.7/Src/qtbase/src/plugins/sqldrivers sudo qmake -- MYSQL_PREFIX=/usr/local cd mysql/ sudo qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/x86_64-linux-gnu" sudo make sudo make install
完毕。
标签:Qt,lib,gnu,mysql,64,usr,linux,报错,x86 From: https://www.cnblogs.com/crazyghostvon/p/qtmysql.html