在 Ubuntu 20.04 上构建 QtQuick 应用程序需要哪些开发包?

juz*_*lin 6 cmake qt-quick qt5 qtquick2 ubuntu-20.04

我在 Qt Creator 中创建了一个模板 QtQuick 项目(用于 CMake),它使用“官方”Qt SDK 在 IDE 中构建得很好。

然而,当尝试在 Ubuntu 20.04 中针对系统 Qt 构建 CLI 时,我得到:

$ mkdir build
$ cd build
$ cmake ..
-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Quick" with any
  of the following names:

    Qt5QuickConfig.cmake
    qt5quick-config.cmake

  Add the installation prefix of "Qt5Quick" to CMAKE_PREFIX_PATH or set
  "Qt5Quick_DIR" to a directory containing one of the above files.  If
  "Qt5Quick" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:28 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/juzzlin/QmlTest/build/CMakeFiles/CMakeOutput.log".
Run Code Online (Sandbox Code Playgroud)

qt5-default除了and qtquickcontrols2-5-dev(不确定是否需要)之外,我还需要安装什么?

juz*_*lin 14

丢失的包裹是qtdeclarative5-dev