I installed Qt 6.2.0 with the online installer and selected most of the module for Desktop development. I get this strange message:
/home/user/Qt/Examples/Qt-6.2.0/multimedia/video/mediaplayer/CMakeLists.txt:28: error: Found package configuration file: /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND. Reason given by package: Failed to find Qt component "Quick". Expected Config file at "/home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake" exists
English is not my primary language, and I'm not sure what the last sentence really means:
"Expected Config file at <path> exists"
Actually the file exists:
$ ls /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake
/home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake
I don't understand why it don't find QtQuick and then I don't know how to fix it...
I had to install the qt6-declarative-dev package for Qt Creator in Ubuntu to pick this up automatically. After that, it worked out of the box.
Failed to find Qt component "Quick".
see the file lib/cmake/Qt6Quick/Qt6QuickTargets.cmake
the variable _IMPORT_PREFIX
tells cmake
where to find the include/
and lib/
files for QtQuick
usually its the parent-parent-parent folder of the cmake file
so /home/user/Qt/6.2.0/gcc_64
in your case
for debugging, add this to Qt6QuickTargets.cmake
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
# ...
message("debug: _IMPORT_PREFIX = ${_IMPORT_PREFIX}")
the file libQt6Quick.so
should be in the _IMPORT_PREFIX
path
otherwise find it by
cd /home/user/Qt/6.2.0/gcc_64
find . -name 'libQt6Quick.so*'
related:
the environment variable QT_ADDITIONAL_PACKAGES_PREFIX_PATH
helps qt to find the lib/cmake/Qt6(modulename)/Qt6(modulename)Targets.cmake
files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With