解决方法:缺少相应的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. Waiting for table flush 阻塞查询的问题

    1.此状态表示大量thread正在等待慢查询语句执行完成. 原因: The thread got a notification that the underlying structure for a ...

  2. 详聊js中的原型/原型链

    先以一段简单的代码为例: function Dog(params){     this.name = param.name;     this.age = param.age;     this.ba ...

  3. Solr的学习使用之(五)添加索引数据

    1.创建SolrServer类 SolrServer类:提供与Solr实例的连接与通信. 往Solr里添加索引数据,据说有好几种办法,这边利用SolrJ操作solr API完成index操作,具体So ...

  4. linux中的一些常用命令

    shutdown -h now 现在马上关机 shutdown -r now 现在重新启动 reboot 现在重新启动 su - 如果当前是普通用户,则输入这条命令切换到管理员用户(root),如果要 ...

  5. 07http基础

    1.http协议 1.1 概念 是对浏览器和服务器端数据传输格式的规范! 1.2 http协议内容 请求 GET /bbs/hello HTTP/1.1 # 请求行 Host: localhost:8 ...

  6. kernel32.dll提供的接口分析

    HANDLE hToken = NULL; DWORD cursessionid; HMODULE hInstKernel32 = NULL; hInstKernel32 = LoadLibrary( ...

  7. neo4j传参

    py2neo_graph= py2neo.Graph("http://****", user="****", password="*****" ...

  8. 占卜DIY

    题目地址 Code #include<iostream> #include<vector> #include<map> using namespace std; s ...

  9. bzoj5518 & loj3046 「ZJOI2019」语言 线段树合并+树链的并

    题目传送门 https://loj.ac/problem/3046 题解 首先问题就是问有多少条路径是给定的几条路径中的一条的一个子段. 先考虑链的做法. 枚举右端点 \(i\),那么求出 \(j\) ...

  10. $2019$ 暑期刷题记录1:(算法竞赛DP练习)

    $ 2019 $ 暑期刷题记录: $ POJ~1952~~BUY~LOW, BUY~LOWER: $ (复杂度优化) 题目大意:统计可重序列中最长上升子序列的方案数. 题目很直接的说明了所求为 $ L ...