My Qt application is failing to start with the following error:
module "QtQuick.Controls" version 2.12 is not installed
My platform is Ubuntu 20.04.2 LTS
. This is a well-known error on StackOverflow. Unfortunately, no answers have worked for me this far. I have exhausted all suggested remedies without any improvement. These are enumerated below:
- Checking compatibility of Qt with QuickControls: I am using
Qt 5.12.8
in QtCreator, and QtCreator 4.11.0. I installed Qt usingsudo apt install qt5 default
andsudo apt-get install qtcreator
. According to the documentation (see here, Qt 5.12 is directly compatible with QtQuick 2.12: - Checking if I specified QtQuick as a dependency: In my
.pro
file, I have addedQT += quick qml quickcontrols2
- Checking if I have the right libraries: I have
qtquickcontrols2-5-dev
,qt5declarative5-dev
, andqml-module-qtquick-controls
. Furthermore,apt-cache search qtquick
shows me that all the qtquick modules are there - Re-installing qtcreator: Some questions suggest re-installing QtCreator. I have tried this, but it had no effect
- QML Emulation layer: I have configured my project to "Use QML emulation layer that is built with the selected Qt". However, this also had no effect
Having performed every one of these steps, and exhausted all StackOverflow questions and Github threads related to the topic, I still cannot find what is causing this issue.
I have additionally included some related questions that I've tried. Question 4 is perhaps the closest to mine, but was solved via the Yocto build system that I am not using:
- import QtQuick.Controls 2.1 QML MODULE NOT FOUND
- Error module "QtQuick" version 2.12 is not installed
- Ubuntu QT install qt quick controls 2.1
- Qt - Module "QtQuick.Controls" is not installed
I would be extremely appreciative of any advice on further resolving this matter.
libQt5QuickControls2.so.5
in the output ofldconfig
(orsudo ldconfig
)? – Amfasis/usr/lib/x86_64-linux-gnu
, I havelibQt5QuickControls2.so.5
,libQt5QuickControls2.so.5.12
, andlibQt5QuickControls2.so.5.12.8
. – Micrifiedldconfig
you need to update your ld-conf. You can probably run the application withLD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu app
? – Amfasis