qt - Qt 5.12:在“/usr/include/libdrm”中找不到“GL/gl.h”
问题描述
我有一个新安装的Ubuntu 18.04.3
系统 (NVIDIA),只安装了Qt SDK 5.12.5
、build-essential
、git
和CMake
。我正在尝试通过在 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。只能通过官方在线安装程序。
解决方案
你需要mesa
包裹。
- 台面通用开发
- libglu1-台面开发
$ sudo apt install mesa-common-dev libglu1-mesa-dev
并尝试。
推荐阅读
- c++ - 使用 GstVideoOverlay 的 gstreamer 使程序崩溃
- html - html表格中不同的单元格高度
- swift - ISO8601DateFormatter - 设置格式选项
- python - 你能帮我解决一下我在 python 中的密码生成器吗
- c# - 组件调用异步异常
- reactjs - 反应原生,视频播放器崩溃没有任何错误
- c++ - 在 msys2 中编译汇编程序源失败
- c# - 包含具有绑定内容依赖属性的 contentpresenter 的自定义上下文菜单不在第二个窗口中显示内容
- c++ - VS 代码分析 (c++) - C26449 误报?
- matlab - 在 MATLAB 中获取图的给定路径的权重