57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
||||||
1 | ||||||
PostgreSQL - QSqlError Driver not loaded04.01.2021, 01:54. Показов 46614. Ответов 30
Здравствуйте.
Сделал тестовую базу данных в PostgreSQL ( версии psql (PostgreSQL) 13.1 (Ubuntu 13.1-1.pgdg20.04+1) ) , хочу написать к ней какой-нибудь пользовательский интерфейс. Пишу код
Код
01:44:50: Запускается /home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/Test06 ... QSqlQuery::exec: database not open QSqlError("", "Driver not loaded", "Driver not loaded") ("QSQLITE", "QODBC", "QODBC3", "QPSQL", "QPSQL7") 01:45:02: /home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/Test06 завершился с кодом 0 В аналогичной теме посоветовали установить пакет libqt5sql5-psql, но это не было результативным. Что еще можно предпринять ?
0
|
04.01.2021, 01:54 | |
Ответы с готовыми решениями:
30
QSqlError("", "Driver not loaded", "Driver not loaded") QODBC (MS SQL SERVER) . Driver not loaded Driver not loaded На машине клиента "QSQLITE" выдает: Driver not loaded Driver not loaded Ошибка - Driver not loaded Driver not loaded |
1539 / 720 / 313
Регистрация: 02.05.2020
Сообщений: 1,604
|
|
04.01.2021, 14:32 | 2 |
перед запуском
export QT_DEBUG_PLUGINS=1 и поспотрите вывод на предмет ошибок
0
|
57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
|
04.01.2021, 15:39 [ТС] | 3 |
Простите, а где это написать? В приложении? В командной строке?
Добавлено через 5 минут А еще нашел вот такую инструкцию https://doc.qt.io/qt-5/sql-driver.html#qpsql Проверил, действительно в папке ~/Qt/6.0.0/Src/qtbase/src/plugins/sqldrivers лежат исходники, получается что плагин надо скомпилировать вручную (почему это не работает из коробки?!). Начал делать все согласно инструкции и получаю: Код
qmake -- PSQL_INCDIR=/usr/include/pgsql Info: creating stash file /home/anton/Qt/6.0.0/Src/qtbase/src/plugins/sqldrivers/.qmake.stash Running configuration tests... Checking for DB2 (IBM)... no Checking for InterBase... no Checking for MySQL... no Checking for OCI (Oracle)... no Checking for ODBC... no Checking for PostgreSQL... yes Done running configuration tests. Configure summary: Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. yes SQLite ................................. yes Using system provided SQLite ......... no Qt is now configured for building. Just run 'make'. Once everything is built, you must run 'make install'. Qt will be installed into '/usr'. Prior to reconfiguration, make sure you remove any leftovers from the previous build. anton@home:~/Qt/6.0.0/Src/qtbase/src/plugins/sqldrivers$ make sub-psql cd psql/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/anton/Qt/6.0.0/Src/qtbase/src/plugins/sqldrivers/psql/psql.pro PSQL_INCDIR=/usr/include/pgsql ) && make -f Makefile make[1]: вход в каталог «/home/anton/Qt/6.0.0/Src/qtbase/src/plugins/sqldrivers/psql» g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -D_REENTRANT -fPIC -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.12.8 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.12.8/QtCore -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -isystem /usr/include/postgresql -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/qsql_psql.o qsql_psql.cpp qsql_psql.cpp:54:10: fatal error: QtSql/private/qsqlresult_p.h: Нет такого файла или каталога 54 | #include <QtSql/private/qsqlresult_p.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:384: .obj/qsql_psql.o] Ошибка 1 make[1]: выход из каталога «/home/anton/Qt/6.0.0/Src/qtbase/src/plugins/sqldrivers/psql» make: *** [Makefile:45: sub-psql] Ошибка 2
0
|
1539 / 720 / 313
Регистрация: 02.05.2020
Сообщений: 1,604
|
|
04.01.2021, 16:36 | 4 |
Ну это переменная окружения, а где писать- зависит откуда как вы запускаете собранную программу.
для сборки драйвера (хотя зачем? он у вас же установлен пакет libqt5sql5-psql) нужен, как минимум, libpq-dev, а, как максимум- ещё куча инструментов.
1
|
57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
|
04.01.2021, 17:07 [ТС] | 5 |
Во истину, век живи век учись. Я вначале подумал это макрос Qt.
Запустил откомпилированное приложение из командной строки и получил огромный вывод: Код
anton@home:~/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug$ ./Test06 QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqeglfs.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqeglfs.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqlinuxfb.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archreq": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqlinuxfb.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqminimal.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqminimal.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqminimalegl.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqminimalegl.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqoffscreen.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqoffscreen.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqvnc.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqvnc.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-egl.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-egl" ] }, "archreq": 0, "className": "QWaylandEglPlatformIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("wayland-egl") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-egl.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-generic.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-generic.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland" ] }, "archreq": 0, "className": "QWaylandIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("wayland") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-generic.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-egl" ] }, "archreq": 0, "className": "QWaylandXCompositeEglPlatformIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("wayland-xcomposite-egl") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-glx" ] }, "archreq": 0, "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("wayland-xcomposite-glx") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwebgl.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwebgl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "webgl" ] }, "archreq": 0, "className": "QWebGLIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("webgl") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqwebgl.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqxcb.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "archreq": 0, "className": "QXcbIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqxcb.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/platforms" ... loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqxcb.so" loaded library "Xcursor" QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/platformthemes" ... QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platformthemes/libqgtk3.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platformthemes/libqgtk3.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "gtk3" ] }, "archreq": 0, "className": "QGtk3ThemePlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("gtk3") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platformthemes/libqgtk3.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "xdgdesktopportal", "flatpak", "snap" ] }, "archreq": 0, "className": "QXdgDesktopPortalThemePlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("xdgdesktopportal", "flatpak", "snap") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/platformthemes" ... loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/platformthemes/libqgtk3.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts" ... QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so, metadata= { "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1", "MetaData": { "Keys": [ "compose", "xim" ] }, "archreq": 0, "className": "QComposePlatformInputContextPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("compose", "xim") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so, metadata= { "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1", "MetaData": { "Keys": [ "ibus" ] }, "archreq": 0, "className": "QIbusPlatformInputContextPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("ibus") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so, metadata= { "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1", "MetaData": { "Keys": [ "qtvirtualkeyboard" ] }, "archreq": 0, "className": "QVirtualKeyboardPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("qtvirtualkeyboard") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/platforminputcontexts" ... loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/iconengines" ... QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/iconengines/libqsvgicon.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/iconengines/libqsvgicon.so, metadata= { "IID": "org.qt-project.Qt.QIconEngineFactoryInterface", "MetaData": { "Keys": [ "svg", "svgz", "svg.gz" ] }, "archreq": 0, "className": "QSvgIconPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("svg", "svgz", "svg.gz") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/iconengines/libqsvgicon.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/iconengines" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats" ... QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqgif.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqgif.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "gif" ], "MimeTypes": [ "image/gif" ] }, "archreq": 0, "className": "QGifPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("gif") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqgif.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqicns.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqicns.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "icns" ], "MimeTypes": [ "image/x-icns" ] }, "archreq": 0, "className": "QICNSPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("icns") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqicns.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqico.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqico.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "ico", "cur" ], "MimeTypes": [ "image/vnd.microsoft.icon", "image/vnd.microsoft.icon" ] }, "archreq": 0, "className": "QICOPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("ico", "cur") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqico.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqjpeg.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqjpeg.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "jpg", "jpeg" ], "MimeTypes": [ "image/jpeg", "image/jpeg" ] }, "archreq": 0, "className": "QJpegPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("jpg", "jpeg") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqjpeg.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqsvg.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqsvg.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "svg", "svgz" ], "MimeTypes": [ "image/svg+xml", "image/svg+xml-compressed" ] }, "archreq": 0, "className": "QSvgPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("svg", "svgz") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqsvg.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtga.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtga.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "tga" ], "MimeTypes": [ "image/x-tga" ] }, "archreq": 0, "className": "QTgaPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("tga") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtga.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtiff.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtiff.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "tiff", "tif" ], "MimeTypes": [ "image/tiff", "image/tiff" ] }, "archreq": 0, "className": "QTiffPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("tiff", "tif") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtiff.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwbmp.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwbmp.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "wbmp" ], "MimeTypes": [ "image/vnd.wap.wbmp" ] }, "archreq": 0, "className": "QWbmpPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("wbmp") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwbmp.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwebp.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwebp.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "webp" ], "MimeTypes": [ "image/webp" ] }, "archreq": 0, "className": "QWebpPlugin", "debug": false, "version": 330752 } Еще я попробовал найти файл qsqlresult_p.h и закинуть его в папку /home/anton/Qt/6.0.0/Src/qtbase/src/plugins/sqldrivers/psql Удивительно, но компиляция пошла, но опять повылезали ошибки, на сей раз ругается на код самих файлов (мол они реализованы криво)
0
|
57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
|
04.01.2021, 17:07 [ТС] | 6 |
Продолжение вывода
Никогда не занимался таким анализом, что вообще искать ? Код
Got keys from plugin meta data ("webp") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwebp.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/imageformats" ... loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqgif.so" loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqicns.so" loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqico.so" loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqjpeg.so" loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqsvg.so" loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtga.so" loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtiff.so" loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwbmp.so" loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwebp.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers" ... QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlite.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlite.so, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QSQLITE" ] }, "archreq": 0, "className": "QSQLiteDriverPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("QSQLITE") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlite.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlodbc.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlodbc.so, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QODBC3", "QODBC" ] }, "archreq": 0, "className": "QODBCDriverPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("QODBC3", "QODBC") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlodbc.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlpsql.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlpsql.so, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QPSQL7", "QPSQL" ] }, "archreq": 0, "className": "QPSQLDriverPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("QPSQL7", "QPSQL") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlpsql.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/sqldrivers" ... loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlite.so" QSqlQuery::exec: database not open QSqlError("", "Driver not loaded", "Driver not loaded") ("QSQLITE", "QODBC", "QODBC3", "QPSQL", "QPSQL7") QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations" ... QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so, metadata= { "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "xcb_egl" ] }, "archreq": 0, "className": "QXcbEglIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("xcb_egl") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so, metadata= { "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "xcb_glx" ] }, "archreq": 0, "className": "QXcbGlxIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("xcb_glx") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/xcbglintegrations" ... loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/accessiblebridge" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/accessiblebridge" ... QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlite.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqgif.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqicns.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqico.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqjpeg.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqsvg.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtga.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqtiff.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwbmp.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/imageformats/libqwebp.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/platformthemes/libqgtk3.so" QLibraryPrivate::unload succeeded on "/home/anton/Qt/5.12.10/gcc_64/plugins/platforms/libqxcb.so" QLibraryPrivate::unload succeeded on "Xcursor" (faked) anton@home:~/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug$
0
|
1539 / 720 / 313
Регистрация: 02.05.2020
Сообщений: 1,604
|
|
04.01.2021, 17:29 | 7 |
Ну из этого информационного мусора надо смотреть строки c "Driver not loaded" и разбирать, какой файл он не видит, например.
0
|
57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
|
05.01.2021, 00:08 [ТС] | 8 |
Там эта фраза всего в одной строке встречается
Код
QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/QtProjects/build-Test06-Desktop_Qt_5_12_10_GCC_64bit-Debug/sqldrivers" ... loaded library "/home/anton/Qt/5.12.10/gcc_64/plugins/sqldrivers/libqsqlite.so" QSqlQuery::exec: database not open QSqlError("", "Driver not loaded", "Driver not loaded") ("QSQLITE", "QODBC", "QODBC3", "QPSQL", "QPSQL7") QFactoryLoader::QFactoryLoader() checking directory path "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations" ... QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so" Found metadata in lib /home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so, metadata= { "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "xcb_egl" ] }, "archreq": 0, "className": "QXcbEglIntegrationPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("xcb_egl") QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so.debug" "The shared library was not found." not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/anton/Qt/5.12.10/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so" Эххх..... вот чего ему надо. Добавлено через 1 час 48 минут Пипец, если проверить версию, то получу Код
QMake version 3.1 Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu Похоже из неё и берутся библиотеки Qt. Зашибись, вот как её обновить ? Добавлено через 3 часа 44 минуты Если поиграться с разными версиями qmake компиляция все же начнется и.... прервется. Код
anton@home:~/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers$ qmake -version QMake version 3.1 Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu anton@home:~/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers$ ~/Qt/5.15.2/gcc_64/bin/qmake -version QMake version 3.1 Using Qt version 5.15.2 in /home/anton/Qt/5.15.2/gcc_64/lib anton@home:~/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers$ ~/Qt/5.15.2/gcc_64/bin/qmake -- PSQL_INCDIR=/usr/include/pgsql Running configuration tests... Checking for DB2 (IBM)... no Checking for InterBase... no Checking for MySQL... no Checking for OCI (Oracle)... no Checking for ODBC... no Checking for PostgreSQL... yes Checking for SQLite (version 2)... no Checking for TDS (Sybase)... no Done running configuration tests. Configure summary: Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. yes SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt is now configured for building. Just run 'make'. Once everything is built, you must run 'make install'. Qt will be installed into '/home/anton/Qt/5.15.2/gcc_64'. Prior to reconfiguration, make sure you remove any leftovers from the previous build. anton@home:~/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers$ make sub-psql cd psql/ && ( test -e Makefile || /home/anton/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /home/anton/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/psql/psql.pro ) && make -f Makefile make[1]: вход в каталог «/home/anton/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/psql» /usr/lib/qt5/bin/qmake -o Makefile psql.pro PSQL_INCDIR=/usr/include/pgsql g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -D_REENTRANT -fPIC -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.12.8 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.12.8/QtCore -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -isystem /usr/include/postgresql -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/qsql_psql.o qsql_psql.cpp qsql_psql.cpp: In constructor ‘QPSQLDriverPrivate::QPSQLDriverPrivate()’: qsql_psql.cpp:152:68: error: no matching function for call to ‘QSqlDriverPrivate::QSqlDriverPrivate(QSqlDriver::DbmsType)’ 152 | QPSQLDriverPrivate() : QSqlDriverPrivate(QSqlDriver::PostgreSQL) {} | ^ In file included from qsql_psql.cpp:55: /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8/QtSql/private/qsqldriver_p.h:66:5: note: candidate: ‘QSqlDriverPrivate::QSqlDriverPrivate()’ 66 | QSqlDriverPrivate() | ^~~~~~~~~~~~~~~~~ /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8/QtSql/private/qsqldriver_p.h:66:5: note: candidate expects 0 arguments, 1 provided /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8/QtSql/private/qsqldriver_p.h:61:7: note: candidate: ‘QSqlDriverPrivate::QSqlDriverPrivate(const QSqlDriverPrivate&)’ 61 | class QSqlDriverPrivate : public QObjectPrivate | ^~~~~~~~~~~~~~~~~ /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8/QtSql/private/qsqldriver_p.h:61:7: note: no known conversion for argument 1 from ‘QSqlDriver::DbmsType’ to ‘const QSqlDriverPrivate&’ /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8/QtSql/private/qsqldriver_p.h:61:7: note: candidate: ‘QSqlDriverPrivate::QSqlDriverPrivate(QSqlDriverPrivate&&)’ /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8/QtSql/private/qsqldriver_p.h:61:7: note: no known conversion for argument 1 from ‘QSqlDriver::DbmsType’ to ‘QSqlDriverPrivate&&’ make[1]: *** [Makefile:384: .obj/qsql_psql.o] Ошибка 1 make[1]: выход из каталога «/home/anton/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/psql» make: *** [Makefile:45: sub-psql] Ошибка 2 Откуда опять взялась версия 5.12.8 ? Я же явно указал и папку и qmake версии 5.15.2 Добавлено через 51 минуту На стакоферфлове, мне подсказали где взять исходники и собрать плагин с нуля. Код
sudo apt-get install libpq-dev git clone -b 5.15.2 https://code.qt.io/qt/qtbase.git cd qtbase/src/plugins/sqldrivers ~/Qt/5.15.2/gcc_64/bin/qmake -- PSQL_INCDIR=/usr/include/pgsql make sub-psql make install
0
|
1539 / 720 / 313
Регистрация: 02.05.2020
Сообщений: 1,604
|
|
05.01.2021, 09:31 | 9 |
ubuntu amd64 плагин хранит по адресу
/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlpsql.so Добавлено через 8 минут Однако, у вас такая каша с версиями... Уточните, какая OS и как устанавливали Qt? Это ведь не windows какая нибудь, в линукс все что вы пытаетесь достичь (установка qt + плагин для postgresql) в 2 вызова пакетного менеджера делается.
0
|
18840 / 9839 / 2408
Регистрация: 30.01.2014
Сообщений: 17,280
|
|
05.01.2021, 10:20 | 10 |
Я тут выделил ключевое и верное в этой теме. Все остальное - это бесполезные попытки шаманизма. В программировании это всегда только вредит.
1) в Ubuntu НЕ надо ничего компилировать и устанавливать руками (признавайтесь, у вас каша с версиями, потому что вы что-то до этого настраивали вручную?). 2) Единственно верный способ - это поставить плагин Qt для PostgreSQL из репозитория. Если это не работает, то надо разбираться почему это не работает, а не пробовать методом тыка другие способы. Так вы сделаете только хуже. Добавлено через 14 минут По логам выше видно, что у вас ваши версии Qt какого-то рожна установлены в home каталог. И судя по всему собирались вручную? Зачем это? В этой самодеятельности и есть корень проблемы. Версия Qt должна быть установлена штатным образом, через пакетный менеджер. Тогда и установка пакета libqt5sql5-psql поможет. Кроме того, раз уж вы решили заняться компиляией, то версия исходников, которые вы используете, должна полностью совпадать с версией Qt, которая у вас установлена в системе. Нельзя просто взять Qt 6.0 и положить оттуда плагин в версию 5.
0
|
57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
|
05.01.2021, 12:45 [ТС] | 11 |
Я ничего не настраивал вручную, просто установил Qt из онлайн инсталлятора, отметив все галочки. Мне там и предложили установить все в каталог home. Кстати я был уверен, что это и есть установка последней версии , а не только компонентов разработки.
Давайте я его снесу и установлю правильно, только скажите в какую папку.
0
|
18840 / 9839 / 2408
Регистрация: 30.01.2014
Сообщений: 17,280
|
|
05.01.2021, 12:48 | 12 |
Этого делать не надо было.
Нужно ставить через репозиторий. Добавлено через 2 минуты Вам не нужно думать ни о каких "папках". Этим пакетный менджер занимается самостоятельно. Более того, скорее всего Qt у вас уже установлена, т.к. должна была подтянуться через зависимости от libqt5sql5-psql. Снесите все вручную установленные версии, только правильно сносите, через деинсталлятор.
0
|
57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
|
05.01.2021, 12:48 [ТС] | 13 |
такая папка /usr/lib/x86_64-linux-gnu/qt5/ тоже есть, что в ней и откуда она не понятно
0
|
18840 / 9839 / 2408
Регистрация: 30.01.2014
Сообщений: 17,280
|
|||||||||||
05.01.2021, 12:55 | 14 | ||||||||||
Это как раз правильный каталог.
При установке пакета Qt5 он создался. Добавлено через 5 минут В консоли что показывает команда
И вот эта команда что показывает?
0
|
57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
|
05.01.2021, 12:57 [ТС] | 15 |
Как не думать о папках, если я ставлю Qt используя файл qt-unified-linux-x64-4.0.1-online.run с сайта Qt, а там просят либо подтвердить папку установки либо указать свою ?
0
|
18840 / 9839 / 2408
Регистрация: 30.01.2014
Сообщений: 17,280
|
|
05.01.2021, 12:58 | 16 |
Я вам уже сказал выше, что этого делать не нужно. Ставьте Qt через репозиторий Ubuntu.
0
|
57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
|
05.01.2021, 13:05 [ТС] | 17 |
qmake-qt5 --version - сейчас пишет, qmake-qt5: команда не найдена
dpkg -l | grep "qtbase5-dev" Код
ii qtbase5-dev:amd64 5.12.8+dfsg-0ubuntu1 amd64 Qt 5 base development files ii qtbase5-dev-tools 5.12.8+dfsg-0ubuntu1 amd64 Qt 5 base development programs Я поэтому и спрашиваю, в какую папку ставить? Онлайн инсталлятор запросит папку для установки. Добавлено через 1 минуту Если поставить через репозиторий, то и версия не последняя, а главное не будут работать компиляторы, я это уже пробовал.
0
|
18840 / 9839 / 2408
Регистрация: 30.01.2014
Сообщений: 17,280
|
|
05.01.2021, 13:17 | 18 |
Ерунда. Пробуйте дальше, ибо это единственно верный способ.
То, что версия не последняя, для вас не должно быть важно на данном этапе. Забудьте про онлайн инсталлятор. Зачем? Я просил вас удалить только вручную установленные версии, через онлайн инсталлятор и т.п. Ставьте теперь обратно. Добавлено через 1 минуту Это вот версия qt в системе. Версия, установленная пакетным менеджером из репозитория. Именно ее и надо использовать. Именно с ней работает пакет libqt5sql5-psql. qmake-qt5 --version должен показать такую же.Что там с компиляторами у вас пока не ясно. Но если все сделать правильно, без метода тыка, то никаких проблем быть не должно. Главное тут придерживаться одной линии, не отвлекаться, разбираться последовательно и все получится.
0
|
1539 / 720 / 313
Регистрация: 02.05.2020
Сообщений: 1,604
|
|
05.01.2021, 15:13 | 19 |
поподробнее опишите, что именно не работало
принципиальна ли именно последняя версия? чем не устраивает то, что ubuntu предлагает?
0
|
57 / 7 / 1
Регистрация: 27.04.2015
Сообщений: 195
|
|
05.01.2021, 15:42 [ТС] | 20 |
Не принципиально, просто я так понимаю что все руководства пишут под последнюю версию.
Сейчас установил все из репозитория Код
sudo apt install qt5-default sudo apt install qtcreator sudo apt install qtbase5-examples qtdeclarative5-examples Это папка где был установлен Qt путем онлайн установщика. Т.е. Qt еще и хранит где-то старые настройки.
0
|
05.01.2021, 15:42 | |
05.01.2021, 15:42 | |
Помогаю со студенческими работами здесь
20
Driver not loaded Qt Mysql driver not loaded QPSQL driver not loaded QMYSQL driver not loaded QMYSQL driver not loaded QMYSQL driver not loaded Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |