How to replace the QT installed by apt-get?
-
Ubuntu 24.04 laster qt version is 6.4 but deskflow need >=6.7.
I tried the two ways to install qt 6.8-
online installer:
The install path is different form the debain pack which is
/usr/lib/x86_64-linux-gnu/qt6/
. And the contents of them are different.
tree ~/Qt/installerResources -L 1 /home/korantli/Qt/installerResources ├── qt.license.thirdparty ├── qt.qt6.680 ├── qt.qt6.680.addons.qtcharts.linux_gcc_64 ├── qt.qt6.680.addons.qtmultimedia.linux_gcc_64 ├── qt.qt6.680.doc ├── qt.qt6.680.doc.qtcharts ├── qt.qt6.680.doc.qtmultimedia ├── qt.qt6.680.examples ├── qt.qt6.680.examples.qtcharts ├── qt.qt6.680.examples.qtmultimedia ├── qt.qt6.680.linux_gcc_64 ├── qt.tools.cmake ├── qt.tools.maintenance ├── qt.tools.ninja ├── qt.tools.qtcreator ├── qt.tools.qtcreator_gui └── qt.tools.qtdesignstudio
tree /usr/lib/x86_64-linux-gnu/qt6/ -L 1 /usr/lib/x86_64-linux-gnu/qt6/ ├── mkspecs ├── plugins ├── qml └── qt6.conf
- source code
build and install, the default path is:/usr/local/Qt-6.8.0/
and contents are:
tree /usr/local/Qt-6.8.0/ -L 1 /usr/local/Qt-6.8.0/ ├── bin ├── doc ├── include ├── lib ├── libexec ├── metatypes ├── mkspecs ├── modules ├── phrasebooks ├── plugins ├── qml └── translations
However, QT is not recognized by the system as 6.8 by default
...... deskflow depends on libqt6core6t64 (>= 6.7.2); however: Version of libqt6core6t64:amd64 on system is 6.4.2+dfsg-21.1build5. deskflow depends on libqt6gui6 (>= 6.7.2); however: Package libqt6gui6 is not installed. Version of libqt6gui6 on system, provided by libqt6gui6t64:amd64, is 6.4.2+dfsg-21.1build5. deskflow depends on libqt6widgets6 (>= 6.7.2); however: Package libqt6widgets6 is not installed. Version of libqt6widgets6 on system, provided by libqt6widgets6t64:amd64, is 6.4.2+dfsg-21.1build5.
The question is :
How to replace the QT installed by apt-get? -
-
@korantli
I don't think you should actually "replace" the Qt6 in/usr/lib/...
as installed viaapt
. That would/might lead to confusion as what is there would not correspond to what was fetched byapt
(e.g. for update or delete).I don't know how your
deskflow depends on libqt6core6t64 (>= 6.7.2); however: Version of libqt6core6t64:amd64 on system is 6.4.2+dfsg-21.1build5.
works, but I would expect you to set an option or environment variable to tell deskflow to find Qt6 includes/libraries in wherever you have built Qt (
/usr/local/Qt-6.8.0/
), or maybe wherever you copy/deploy that to after building if you are supposed to do that. If deskflow has no way of doing this and insists on only using a Qt6 as installed in a "system" region/byapt
then that is not very good and you might ask the deskflow people. -
Hi,
I'd go a step further than @JonB: you just don't.
Trying to replace your system libraries with variants built for development on a larger set of distribution is a no go.
Use the LD_LIBRARY_PATH environment variable to point your application to your custom Qt. Do it in the terminal you use to start that application or in a bash script to start the application.
Do NOT use it to modify which version of Qt is used by your whole system. This will only bring troubles.
-
@SGaist said in How to replace the QT installed by apt-get?:
Hi,
I'd go a step further than @JonB: you just don't.
Trying to replace your system libraries with variants built for development on a larger set of distribution is a no go.
Use the LD_LIBRARY_PATH environment variable to point your application to your custom Qt. Do it in the terminal you use to start that application or in a bash script to start the application.
Do NOT use it to modify which version of Qt is used by your whole system. This will only bring troubles.
Got it.