解决方法:缺少相应的opengl的库,需要安装opengl库

一、Ubuntu下解决Qt5.11.1 cannot find -lGL

有两种原因:

  • 一种是没有按照libGL库,那么就安装:
sudo apt-get install libgl1-mesa-dev
  • 一种是装了,但是libGL动态链接库的路径不对,那么就配置一下路径:
$ locate libGL
/usr/lib/i386-linux-gnu/mesa/libGL.so.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/x86_64-linux-gnu/libGLEW.so.1.10
/usr/lib/x86_64-linux-gnu/libGLEW.so.1.10.0
/usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.10
/usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.10.0
/usr/lib/x86_64-linux-gnu/libGLU.so.1
/usr/lib/x86_64-linux-gnu/libGLU.so.1.3.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2
/usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2.0.0
$ sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/libGL.so

二、CentOS7遇到Qt编译问题的解决方案(error: cannot find -lGL)

    1. 安装opengl库,缺少相应的opengl的库,安装以下OpenGL相关库:
        yum install mesa-libGL-devel mesa-libGLU-devel freeglut-devel
    1. 加入libGL库到/usr/lib目录下

使用locate libGL命令或find /usr -name libGL*命令搜索。

搜索结果中发现/usr/lib64/libGL.so.1文件(这个文件也可能在另一个目录中)。

[havealex@localhost ~]$ locate libGL
/home/havealex/QtProjects/QT5.9Samp/chap16Aux/samp16_3Setup/minGW/libGLESV2.dll
/home/havealex/QtProjects/QT5.9Samp/chap16Aux/samp16_3Setup/msvc32/libGLESV2.dll
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_egl.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_egl.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_egl_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_egl_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_3_0.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_3_0.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_3_0_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_3_0_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/global_state.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/global_state.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2.def
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2_mingw32.def
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2d.def
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2d_mingw32.def
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/angle/src/libGLESv2
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/angle/src/libGLESv2/libGLESv2.pro
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2.gypi
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM/libGLESv1_CM.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM/libGLESv1_CM.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM/libGLESv1_CM.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_egl.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_egl.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_egl_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_egl_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_1_0_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_1_0_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_2_0_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_2_0_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_2_0_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_3_0_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_3_0_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_3_1_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_3_1_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_ext_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_ext_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/gen_proc_table.py
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/global_state.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/global_state.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/libGLESv2.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/libGLESv2.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/libGLESv2.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/proc_table.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/proc_table_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/proc_table_data.json
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/mesa/src/docs/libGL.txt
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Buffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Buffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Context.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Context.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Device.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Device.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Display.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Display.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Fence.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Fence.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Framebuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Framebuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Image.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Image.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/IndexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/IndexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Program.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Program.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Query.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Query.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Renderbuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Renderbuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/ResourceManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/ResourceManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Shader.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Shader.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Surface.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Surface.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Texture.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Texture.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/VertexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/VertexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.vcxproj
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.vcxproj.filters
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/main.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/main.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/mathutil.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/utilities.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/utilities.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Android.mk
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Buffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Buffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Context.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Context.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Device.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Device.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Framebuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Framebuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/IndexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/IndexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Renderbuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Renderbuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/ResourceManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/ResourceManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Texture.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Texture.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/VertexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/VertexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.lds
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.vcxproj
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.vcxproj.filters
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/main.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/main.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/mathutil.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/utilities.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/utilities.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Android.mk
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Buffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Buffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Context.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Context.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Device.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Device.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Fence.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Fence.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Framebuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Framebuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/IndexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/IndexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Program.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Program.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Query.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Query.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Renderbuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Renderbuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/ResourceManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/ResourceManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Sampler.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Shader.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Texture.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Texture.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/TransformFeedback.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/TransformFeedback.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/VertexArray.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/VertexArray.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/VertexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/VertexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/entry_points.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.lds
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.vcxproj
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.vcxproj.filters
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv3.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/main.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/main.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/mathutil.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/utilities.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/utilities.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/third_party/PowerVR_SDK/Builds/Windows/x86_32/Lib/libGLES_CM.lib
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/third_party/PowerVR_SDK/Builds/Windows/x86_32/Lib/libGLESv2.lib
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/third_party/PowerVR_SDK/Builds/Windows/x86_64/Lib/libGLES_CM.lib
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/third_party/PowerVR_SDK/Builds/Windows/x86_64/Lib/libGLESv2.lib
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/libGLSL.so
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/libGLSL.so.4
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/libGLSL.so.4.6
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/libGLSL.so.4.6.2
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/plugins/libGLSLEditor.so
/usr/lib/libGL.so
/usr/lib64/libGL.so
/usr/lib64/libGL.so.1
/usr/lib64/libGL.so.1.7.0
/usr/lib64/libGLESv1_CM.so
/usr/lib64/libGLESv1_CM.so.1
/usr/lib64/libGLESv1_CM.so.1.2.0
/usr/lib64/libGLESv2.so
/usr/lib64/libGLESv2.so.2
/usr/lib64/libGLESv2.so.2.1.0
/usr/lib64/libGLU.so
/usr/lib64/libGLU.so.1
/usr/lib64/libGLU.so.1.3.1
/usr/lib64/libGLX.so
/usr/lib64/libGLX.so.0
/usr/lib64/libGLX.so.0.0.0
/usr/lib64/libGLX_mesa.so.0
/usr/lib64/libGLX_mesa.so.0.0.0
/usr/lib64/libGLX_system.so.0
/usr/lib64/libGLdispatch.so
/usr/lib64/libGLdispatch.so.0
/usr/lib64/libGLdispatch.so.0.0.0

从上面的结果可以看到,libGL库被安装到/usr/lib64目录下,然后使用ln -s/usr/lib64/libGL.so.1 /usr/lib/libGL.so命令给已存在的库文件创建一个软链接到/usr/lib目录。

ln -s/usr/lib64/libGL.so.1  /usr/lib/libGL.so

再在QtCreator中运行QT项目,就不会报"Qt Creator出现cannot find -lGL"这个错误了。

参考链接

CentOS7和Ubuntu18.10下运行Qt Creator出现cannot find -lGL的问题的解决方案的更多相关文章

  1. Ubuntu18.10下运行blender2.80bate闪退(问题?)

    Ubuntu18.10下直接运行blender2.80bate闪退, 运行blender2.79正常. ================= root@tom-laptop:/# uname -aLin ...

  2. Ubuntu18.10下安装Qt5.12过程记录

    首先你得先安装Ubuntu操作系统(我是在VMWare14中安装的Ubuntu18.10版本). 阿里镜像:https://opsx.alibaba.com/mirror 我这里下载的文件为:ubun ...

  3. ubuntu下借助qt creator创建属于自己的共享库

    简介: 在 Windows 上,共享库由 .dll 表示:在 Linux 上,由 .so 表示. Shared Library的优势 共享库,又称动态库或so文件,顾名思义,它可以在可执行文件启动时加 ...

  4. Windows下的Qt Creator的安装

    采用Qt和Qt creator分别下载和安装的方式:(需要手动设置关联Qt和Qt Creator)   一.软件下载 从http://qt-project.org/downloads分别下载Qt和Qt ...

  5. win下配置qt creator 能够执行c/c++

    首先需要相关包共四个: qt-win-opensource-4.8.5-mingw.exe qt-creator-windows-opensource-2.8.1.exe MinGW-gcc440_1 ...

  6. windows下,Qt Creator 中javascript调试器安装并使用

    最开始使用Qt Creator时,想使用断点来调试javascript代码.但在按下debug键后,却提示调试器未配置,让我比较郁闷. 好了,郁闷的是说了,咱们来说说高兴的.要Qt Creator调试 ...

  7. Ubuntu18.10下出现Could not get lock /var/lib/dpkg/lock的错误

    最近在Windows10系统下使用Oracle VM VirtualBox6.0.2下安装的Ubuntu18.10时,运用sudo  apt-get install 安装pkg-config工具,在终 ...

  8. Ubuntu 14.10 下运行进程实时监控pidstat命令详解

    简介 pidstat主要用于监控全部或指定进程占用系统资源的情况,如CPU,内存.设备IO.任务切换.线程等.pidstat首次运行时显示自系统启动开始的各项统计信息,之后运行pidstat将显示自上 ...

  9. centos7.5&ubuntu18.10安装Google浏览器

    一.手动安装 1. 下载 rpm 包https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm 2. 安装依赖 ...

随机推荐

  1. 什么是服务端伪造(SSRF)

    什么是服务端伪造(SSRF) 原文:GitHub Pages and Single-Page Apps 译者:neal1991 welcome to star my articles-translat ...

  2. MongoDB的使用学习之(一)开篇

    本人是菜鸟-1级,整理这个系列,之所以用整理,而不是写,是因为本人不是从头自己读源码,一个一个字母翻译过来的,而是记录整个学习过程,查看别人好的文章,收集好的资料,并有自己的一些项目代码,并从中得到点 ...

  3. runtime 理解笔记

    runtime 简称运行时,是系统运行的一种机制,在oc中通过c语言编写一个运行系统库.考进行一些非常底层的操作(oc无法完成的). 1.利用runtime,在程序运行过程中,动态创建一个类(比如KV ...

  4. VS 2019编辑含有资源文件.resx的项目时提示MSB3086 任务未能使用 SdkToolsPath 或注册表项找到“al.exe”

    环境: Win10 X64, VS2019 错误提示: 错误 MSB3086 任务未能使用 SdkToolsPath“”或注册表项“HKEY_LOCAL_MACHINE\SOFTWARE\Micros ...

  5. 记录cobbler报错

    出现下面这个错误解决方法 httpd does not appear to be running and proxying cobbler, or SELinux is in the way. Ori ...

  6. python面向对象--包装标准类型及组合方式授权

    # 实现授权是包装的一个特性.包装一个类型通常是对已存在的类型进行一些自定义定制, # 这种做法可以新建,修改,或删除原有产品的某些功能,而其他的保持不变. # 授权的过程,其实也就是所有的更新功能都 ...

  7. bzoj3252 攻略 贪心+dfs序+线段树

    题目传送门 https://lydsy.com/JudgeOnline/problem.php?id=3252 题解 有一个非常显然的贪心思路:每次选择目前走到那儿能够获得的新权值最大的点. 证明的话 ...

  8. python学习笔记(七)模块

    一个python文件就是一个模块 1.标准模块 python自带的,不需要你安装的 2.第三方模块 需要安装,别人提供的,例:pip install radis 如果提示没有pip,把python下s ...

  9. ECS 按量付费转包年包月支持按周啦

    功能场景 不需要别的理由,就是省钱. 以 华北1 ecs.t5-c1m2.xlarge ( 4vCPU 8GB ) 为例:按量付费一周需要 131元,而按周付费只需要 68元. 如果您正在使用按量付费 ...

  10. 5,Vector

    一,Vector简介 1,Vector 是矢量队列,它是JDK1.0版本添加的类. 2,Vector 继承了AbstractList,实现了List:所以,它是一个队列,支持相关的添加.删除.修改.遍 ...