首页 > 解决方案 > 致命错误:GL/glx.h:没有这样的文件或目录 libgl1-mesa-dev 已经安装

问题描述

我正在尝试编译 skia 以在 Ubuntu 19.10 上编译 aseprite,我不断收到错误消息

c++ -MMD -MF obj/src/gpu/gl/glx/gpu.GrGLMakeNativeInterface_glx.o.d -DNDEBUG -DSK_SAMPLES_FOR_X -DSK_GAMMA_APPLY_TO_A8 -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 -DSK_ENABLE_DISCRETE_GPU -DSKIA_IMPLEMENTATION=1 -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/docs -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../src/gpu -fstrict-aliasing -fPIC -O3 -fdata-sections -ffunction-sections -Wno-unused-parameter -std=c++14 -fno-exceptions -fno-rtti -c ../../src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp -o obj/src/gpu/gl/glx/gpu.GrGLMakeNativeInterface_glx.o
../../src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp:15:10: fatal error: GL/glx.h: No such file or directory
   15 | #include <GL/glx.h>
      |          ^~~~~~~~~~

我发现的所有帖子都说要libgl1-mesa-dev使用 apt-get 进行安装,但我已经这样做了,但仍然出现错误。我也试过install_dependencies.shtools文件夹中运行,它安装了一堆其他的东西。

标签: c++skiaglx

解决方案


您可以下载 glx 文件并将其复制到您的项目文件中,这将修复错误,但我们不推荐


推荐阅读