问题:QsqlDatabase: QPsql driver not loaded
use ldd to find the dependencies of an executable/shared object
libpq.so.5 => not found
所以,发现缺少了libpq.so.5,
这个库位于/usr/local/pgsql/lib,我们要将该路径加到 LD_LIBRAY_PATH中,或者编辑
/etc/ld.so.conf,加入/usr/local/pgsql/lib
保存
$ sudo ldconfig
更新链接库缓存