【问题标题】:Qt 5.12: Failed to find "GL/gl.h" in "/usr/include/libdrm"Qt 5.12:在“/usr/include/libdrm”中找不到“GL/gl.h”
【发布时间】:2020-03-06 08:00:12
【问题描述】:

我有一个新安装的 Ubuntu 18.04.3 系统 (NVIDIA),只安装了 Qt SDK 5.12.5build-essentialgitCMake。我正在尝试通过在 Qt Creator 中打开主 CMakeLists.txt 来构建 Qt 项目:

Check for working CXX compiler: /usr/bin/g++
Check for working CXX compiler: /usr/bin/g++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at /home/juzzlin/Qt/5.12.5/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
  Failed to find "GL/gl.h" in "/usr/include/libdrm".
Call Stack (most recent call first):
  /home/juzzlin/Qt/5.12.5/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:174 (include)
  /home/juzzlin/Qt/5.12.5/gcc_64/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:89 (find_package)
  CMakeLists.txt:89 (find_package)

我还应该安装什么?

注意:我根本没有从存储库安装 Qt。只能通过官方在线安装程序。

【问题讨论】:

    标签: qt opengl cmake nvidia ubuntu-18.04


    【解决方案1】:

    你需要mesa 包。

    • 台面通用开发
    • libglu1-mesa-dev

    $ sudo apt install mesa-common-dev libglu1-mesa-dev
    并尝试。

    【讨论】:

    • 为我工作。这在任何地方都有记录吗?... Qt 文档/支持应该提到它...
    • @Wouzz, mesa packages 是 OpenGL 规范的开源实现,是 OpenGL 应用程序所必需的。
    【解决方案2】:

    如果任何使用 Fedora/RHEL 的人发现这个问题,mesa 包在此处的名称会有所不同。

    • 台面-libGL
    • mesa-libGL-devel

    $ sudo dnf install mesa-libGL mesa-libGL-devel

    来源:https://access.redhat.com/solutions/56301

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-07
      • 2015-12-13
      • 2012-05-04
      • 2023-03-29
      • 2011-04-15
      • 2014-04-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多