Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu
-
@rmam I never had any problems with Qt installed using Qt Online Installer. You can use this installer to install any supported Qt version. They will be installed in /home/USER_NAME/qt (or whatever directory you provide). So, why not simply use the Online Installer? And why do you think Qt provided by the distribution is incomplete? What is missing?
@jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:
So, why not simply use the Online Installer?
If there are some overlapping files in the system then this may cause some problems. For example, after installing Qt from Qt's Online Installer Qt Creator failed to find the recently added Qt files, and instead apparently pointed to files and file locations where the official Ubuntu/Debian packages were/would be installed
-
@jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:
So, why not simply use the Online Installer?
If there are some overlapping files in the system then this may cause some problems. For example, after installing Qt from Qt's Online Installer Qt Creator failed to find the recently added Qt files, and instead apparently pointed to files and file locations where the official Ubuntu/Debian packages were/would be installed
@rmam I never had any issues with online installer. It installs Qt by default in /home/username/qt - so, there are no conflicts. You simply need to make sure your Kits in QtCreator are configured properly. If QtCreator cannot find the new installed Qt, then simply go to "Qt Versions" in QtCreator settings and add this Qt version there. Then create a Kit pointing to this Qt version.
But usually QtCreator detects Qt. My guess is you're still using QtCreator from your Linux distribution, use the one installed via Qt Online Installer. -
@rmam I never had any issues with online installer. It installs Qt by default in /home/username/qt - so, there are no conflicts. You simply need to make sure your Kits in QtCreator are configured properly. If QtCreator cannot find the new installed Qt, then simply go to "Qt Versions" in QtCreator settings and add this Qt version there. Then create a Kit pointing to this Qt version.
But usually QtCreator detects Qt. My guess is you're still using QtCreator from your Linux distribution, use the one installed via Qt Online Installer.@jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:
If QtCreator cannot find the new installed Qt, then simply go to "Qt Versions" in QtCreator settings and add this Qt version there. Then create a Kit pointing to this Qt version.
After installing Qt with Qt's online installer, Qt Creator autodetected Ubuntu's default installation as well as the two Qt versions I've installed with Qt's online installer. Ubuntu's default install is listed with a yellow triangle with an exclamation mark. After uninstalling Ubuntu's qmake package, Qt Creator kept listing Ubuntu's default installation but this time displaying a red triangle with an exclamation mark.
Apparently Qt Creator doesn't let the user to remove autodetected entries, as both the "Remove" and "Clean up" buttons is greyed out.
Is there any way to ignore an autodetected entry?
-
@jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:
If QtCreator cannot find the new installed Qt, then simply go to "Qt Versions" in QtCreator settings and add this Qt version there. Then create a Kit pointing to this Qt version.
After installing Qt with Qt's online installer, Qt Creator autodetected Ubuntu's default installation as well as the two Qt versions I've installed with Qt's online installer. Ubuntu's default install is listed with a yellow triangle with an exclamation mark. After uninstalling Ubuntu's qmake package, Qt Creator kept listing Ubuntu's default installation but this time displaying a red triangle with an exclamation mark.
Apparently Qt Creator doesn't let the user to remove autodetected entries, as both the "Remove" and "Clean up" buttons is greyed out.
Is there any way to ignore an autodetected entry?
@rmam said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:
Is there any way to ignore an autodetected entry?
Yes - don't use it.
Don't use the Kit which uses this autodetected Qt.
Also, if you put mouse cursor over this yellow/red exclamation mark - what do you see? -
@rmam said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:
Is there any way to ignore an autodetected entry?
Yes - don't use it.
Don't use the Kit which uses this autodetected Qt.
Also, if you put mouse cursor over this yellow/red exclamation mark - what do you see?@jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:
Yes - don't use it.
Don't use the Kit which uses this autodetected Qt.Ok good to hear.
Also, if you put mouse cursor over this yellow/red exclamation mark - what do you see?
Unfortunately, nothing.
-
Apparently Qt Creator searches for instances of qmake within the file system to autodetect Qt installations. However, that approach is error-prone. For example, Debian/Ubuntu come with a package called qtchooser, which supposedly provides an easy way to pick between default Qt versions by updating a bunch of symlinks, including symlink from /usr/bin/qmake. However, that symlink persists even when all Qt packages are removed. Therefore, Qt Creator keeps autodetecting a zombie Qt version in Debian/Ubuntu even when no Qt version is available, just because it found a dead symlink to a qmake instance.
Removing the qtchooser package is a bad idea because apparently it's listed as a dependency of a bunch of other packages.
-
Apparently Qt Creator searches for instances of qmake within the file system to autodetect Qt installations. However, that approach is error-prone. For example, Debian/Ubuntu come with a package called qtchooser, which supposedly provides an easy way to pick between default Qt versions by updating a bunch of symlinks, including symlink from /usr/bin/qmake. However, that symlink persists even when all Qt packages are removed. Therefore, Qt Creator keeps autodetecting a zombie Qt version in Debian/Ubuntu even when no Qt version is available, just because it found a dead symlink to a qmake instance.
Removing the qtchooser package is a bad idea because apparently it's listed as a dependency of a bunch of other packages.
-
@jsulm yes it obviously is if Qt Creator interprets a dead symlink as the presence of a full Qt installation.
This problem is further compounded by the fact that Qt Creator offers no way to ignore/blacklist autodetected instances of Qt.
-
I confirm that the problem identified in this thread still exist.
On Ubuntu, using the online installer, I have installed several version of Qt - 5.15.2 and 6.1.2, in addition to the "default" one 5.12.8 installed from a repository.
In Qt Creator (I have tried two versions: QtCreator 4.15.2 and 5.0.0-beta1), while 6.1.2 seems to be able to start properly (could not do a complete check on my code since some of the modules are still missing in Qt6),
the 5.15.2 version is bugging:
If I select this version in QtCreator, and compile my code, I get this error (multiple times):
/home/andr/Qt/5.15.2/gcc_64/bin/uic: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by /home/andr/Qt/5.15.2/gcc_64/bin/uic)Is there a configuration step I am missing?