41

In ubuntu20.04 qt5-default was the package name. So I tried the same and qt6-default in 22.04.

Then I tried apt-cache search qt which revealed (among many others): qt6-base-dev and qt5-base-dev.

I am unsure whether the new qt{version}-base-dev is the old qt5-default. If not: What is?

2
  • 1
    Thanks for asking, I needed this for Linux kernel 5.4 compilation. Commented Jan 11, 2023 at 4:00
  • Instead of Qt6 I went with Qt5 as it was having one header installation error as that header got deprecated in the Qt6 Commented Dec 30, 2023 at 16:42

4 Answers 4

49

You need to install packages:

sudo apt install -y qtcreator qtbase5-dev qt5-qmake cmake

And you need to manually change the Qt version: screenshot how to manually change Qt version

Then you need to manually change Qt version in the Kits tab: screenshot on the Kits tab

6
  • 2
    That -does- work to install qtcreator (and especially the proper kit stuff) onto raspberry pi (regular 32 bit os). That helped me a looot - thanks! Commented Jun 5, 2022 at 2:32
  • 1
    This worked for me on amd-64 Ubuntu 22.04
    – Matt
    Commented Jun 8, 2022 at 14:44
  • 1
    Is there any documentation page for this? Commented Sep 7, 2022 at 20:07
  • 1
    This sort of OVER-answers the question. What about for a "client" machine which only needs the Qt libraries to run programs? qt-default used to take care of that. What now? qtchooser doesn't install any libraries. qt5-base no longer exists either. Commented Apr 21, 2023 at 16:26
  • 1
    Note that in Ubuntu 22.10 qtcreator's dependencies are all from Qt6 (see apt-cache depends qtcreator | grep qt6). qtbase5-dev is still there though (and automatically installs qt5-cmake), so just sudo apt-get install qtbase5-dev is sufficient for basic Qt5.
    – user643722
    Commented Oct 26, 2023 at 9:29
5

Starting with Ubuntu 22.04, you can use qt6-base, qt6-base-dev or qt6-tools-dev

1
  • 5
    Unable to locate package qt6-base Commented May 16, 2023 at 19:27
4

Why don't you install it with their online installer.

Once downloaded, chmod +x qt-unified-linux-<arch>-<version>-online.run then ./qt-unified-linux-<arch>-<version>-online.run

7
  • I try to use the package manager whenever I am able, but you are right given my question.
    – Natan
    Commented Apr 25, 2022 at 8:24
  • 1
    @Natan I tried the same thing. Maybe it'll get there in the future since 22.04 is relatively new.
    – Logan
    Commented Apr 25, 2022 at 19:02
  • Unfortunately, the online installer does not run on arm64 architecture.
    – Dragos
    Commented Apr 30, 2022 at 11:30
  • @Dragos You can also build from source if you are unable to use the installer.
    – Logan
    Commented May 1, 2022 at 18:03
  • 1
    this is a good answer and will get you the latest qt6.2+ BUT if you want to use the qt that came with your distro (especially if you use Kubuntu - which i guess you don't) then sudo apt install answer is the way to go if you want to distribute .deb files on kubuntu. which i guess you don't :) Commented Jun 3, 2022 at 21:41
0

For all who just want to install vulkan-sdk on Ubuntu 22.04 like I wanted, getting the error

The following packages have unmet dependencies:
 vulkancapsviewer : Depends: qt5-default but it is not installable

These instructions helped in my case: https://vulkan.lunarg.com/doc/sdk/1.3.236.0/linux/getting_started_ubuntu.html

wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt update
sudo apt install vulkan-sdk
1
  • 1
    Why giving information about the vulkan SDK since the topic is to install Qt ?
    – A.G.
    Commented Feb 2 at 12:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .