When trying to open a program that requires Qt6, it gives error while loading shared libraries: libQt6Network.so.6: cannot open shared object file: No such file or directory
. I tried installing Qt6 by going to the Qt website -> Downloads for open source users -> Download the Qt Online Installer -> Qt Online Installer for Linux (64-bit), then in the installer itself I selected "Qt 6.2 for desktop development". After it'd finished installing I restarted and tried to open the program again, and it still gave the same error. I'd also seen sudo apt install qt6-base-dev
be suggested so I tried that, but that just gives the error Unable to locate package qt6-base-dev
, so now I'm not sure what else I could try.
2 Answers
libqt6network6
is indeed part of the qt6-base-dev
meta-package and you can install it like so:
sudo apt install qt6-base-dev
However, unfortunately, this meta-package is not available for Ubuntu 21.10. It is currently available only for Ubuntu 22.04
-
@Foxes Either you upgrade to Ubuntu 22.04 which I strongly recommend ... or you go the "at your own risk way" :)– RaffaApr 24, 2022 at 22:14
You might try to use Owen Kirby's backport of Qt6:
sudo add-apt-repository ppa:okirby/qt6-backports
sudo apt update
sudo apt install qt6-base-dev [...]
Just like @Raffa, I also strongly recommend the update to Ubuntu 22.04, and Owen Kirby's backports are perhaps not the most up to date (6.2.2 at the time of writing; it's a LTS version; the most recent version of Qt 6 is 6.3.1), but it should get you going