简体   繁体   English

CMake在Docker / Ubuntu 18.04中找不到Qt5LinguistTools

[英]CMake cannot find Qt5LinguistTools in Docker / Ubuntu 18.04

My simple Dockerfile: 我的简单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

When I check linguist inside the container it's there: 当我检查容器内的linguist ,它就在那里:

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

...but when I configure my app inside the container: ...但是当我在容器中配置我的应用程序时:

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.

What is going on? 到底是怎么回事? This works on Ubuntu 16.04 just fine. 这适用于Ubuntu 16.04就好了。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM