【问题标题】:CMake cannot find Qt5LinguistTools in Docker / Ubuntu 18.04CMake 在 Docker / Ubuntu 18.04 中找不到 Qt5LinguistTools
【发布时间】:2019-01-12 20:23:10
【问题描述】:

我的简单 Dockerfile:

FROM ubuntu:18.04

RUN apt update && apt upgrade -y

RUN apt install build-essential cmake qt5-default -y

RUN apt install qttools5-dev-tools -y

当我检查容器内的linguist 时,它就在那里:

root@9087245330a7:/# which linguist
/usr/bin/linguist

...但是当我在容器内配置我的应用程序时:

CMake Error at CMakeLists.txt:72 (find_package):
  By not providing "FindQt5LinguistTools.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5LinguistTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5LinguistTools"
  (requested version 5.5.1) with any of the following names:

    Qt5LinguistToolsConfig.cmake
    qt5linguisttools-config.cmake

  Add the installation prefix of "Qt5LinguistTools" to CMAKE_PREFIX_PATH or
  set "Qt5LinguistTools_DIR" to a directory containing one of the above
  files.  If "Qt5LinguistTools" provides a separate development package or
  SDK, be sure it has been installed.

发生了什么事?这适用于 Ubuntu 16.04 就好了。

【问题讨论】:

    标签: qt docker cmake qt5 ubuntu-18.04


    【解决方案1】:

    问题在于,在 Ubuntu 18.04+ 中,您还需要安装 qttools5-dev 才能获得 /usr/lib/x86_64-linux-gnu/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake

    【讨论】:

    • 非直觉问题的最佳答案
    • 安装 ksnip 工作正常。问题说:“找不到由“Qt5LinguistTools”提供的具有以下任何名称的包配置文件:Qt5LinguistToolsConfig.cmake qt5linguisttools-config.cmake”但现在安装qttools5-dev已解决
    猜你喜欢
    • 1970-01-01
    • 2018-10-22
    • 2020-03-01
    • 2019-11-20
    • 2020-09-10
    • 2015-09-19
    • 1970-01-01
    • 1970-01-01
    • 2023-03-17
    相关资源
    最近更新 更多