Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. g++: error: /lib64/libGL.so: No such file or directory

g++: error: /lib64/libGL.so: No such file or directory

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vasu_gupta
    wrote on 30 Jan 2019, 11:48 last edited by
    #1

    I am using ubuntu 16.04 , qt 5.1.12.

    i have already tried

    sudo apt-get install build-essential libgl1-mesa-dev
    

    which gave me

    build-essential is already the newest version (12.1ubuntu2).
    libgl1-mesa-dev is already the newest version (18.0.5-0ubuntu0~16.04.1).
    
    
    opitical@optical:~$ locate libGL.
    

    /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/mesa/src/docs/libGL.txt
    /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.cpp
    /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.def
    /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.rc
    /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.vcxproj
    /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.vcxproj.filters
    /usr/lib/x86_64-linux-gnu/libGL.so
    /usr/lib/x86_64-linux-gnu/mesa/libGL.so
    /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
    /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0

    J 1 Reply Last reply 30 Jan 2019, 11:57
    0
    • V vasu_gupta
      30 Jan 2019, 11:48

      I am using ubuntu 16.04 , qt 5.1.12.

      i have already tried

      sudo apt-get install build-essential libgl1-mesa-dev
      

      which gave me

      build-essential is already the newest version (12.1ubuntu2).
      libgl1-mesa-dev is already the newest version (18.0.5-0ubuntu0~16.04.1).
      
      
      opitical@optical:~$ locate libGL.
      

      /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/mesa/src/docs/libGL.txt
      /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.cpp
      /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.def
      /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.rc
      /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.vcxproj
      /home/opitical/Qt/5.12.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.vcxproj.filters
      /usr/lib/x86_64-linux-gnu/libGL.so
      /usr/lib/x86_64-linux-gnu/mesa/libGL.so
      /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
      /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 30 Jan 2019, 11:57 last edited by
      #2

      @vasu_gupta Can you show your pro file?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vasu_gupta
        wrote on 30 Jan 2019, 12:21 last edited by SGaist
        #3

        @jsulm

        #-------------------------------------------------
        #
        # Project created by QtCreator 2017-08-16T18:19:20
        #
        #-------------------------------------------------
        
        QT       += core gui
        QT       += xml
        QT       += core
        
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        
        TARGET = Qstackwidget_gui
        TEMPLATE = app
        
        # The following define makes your compiler emit warnings if you use
        # any feature of Qt which as been marked as deprecated (the exact warnings
        # depend on your compiler). Please consult the documentation of the
        # deprecated API in order to know how to port your code away from it.
        DEFINES += QT_DEPRECATED_WARNINGS
        
        # You can also make your code fail to compile if you use deprecated APIs.
        # In order to do so, uncomment the following line.
        # You can also select to disable deprecated APIs only up to a certain version of Qt.
        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
        
        
        QMAKE_LFLAGS += "-Wl,--enable-new-dtags,-rpath,/opt/pylon5/lib64"
        INCLUDEPATH += /usr/local/include/opencv2
        INCLUDEPATH += /usr/local/lib/
        INCLUDEPATH += /usr/local/include/opencv
        INCLUDEPATH += /opt/pylon5/include
        INCLUDEPATH +=/home/optical/Downloads/pylon-5.0.12.11829-x86_64/Samples/C++/include
        LIBS += -L/usr/local/lib -lopencv_core -lopencv_features2d -lopencv_imgcodecs -lopencv_highgui -lopencv_imgproc -lopencv_photo -lpthread \
                 -L/opt/pylon5/lib64 -lpylonbase -lpylonutility -lGenApi_gcc_v3_0_Basler_pylon_v5_0 -lGCBase_gcc_v3_0_Basler_pylon_v5_0
        
        SOURCES += \
                main.cpp \
                mainwindow.cpp \
            \ # stackedwidget.cpp #\
            stackedwidget_new.cpp \
            cal_widget.cpp \
            variables.cpp \
            ClickableLabel.cpp \
            ../RS232/rs232.c \
            ../RS232/rs232main.cpp \
            ../ExtTrig/ExtTrig.cpp \
            #../ExtTrig/frameobserver.cpp \
            ../IP/ossmprocessing.cpp \
            ../ossm_test/IP_test_timing_complete/structures.cpp \
            ../ossm_test/IP_test_timing_complete/Screw_focus.cpp \
            ../ossm_test/IP_test_timing_complete/Log.cpp \
            ../ossm_test/IP_test_timing_complete/Constants.cpp \
            ../ossm_test/IP_test_timing_complete/DimMesasure.cpp \
            report_viewer.cpp \
            ../ossm_test/IP_test_timing_complete/Segmentation.cpp \
            new_part_config.cpp \
            defect_label.cpp \
            defect_display_dialog.cpp \
            crack_calibration.cpp \
            groove_calibration.cpp
        
           # qled.cpp \
         #   qledplugin.cpp
        
        HEADERS += \
                mainwindow.h \
            \ # stackedwidget.h #\
            stackedwidget_new.h \
            cal_widget.h \
            variables.h \
            ClickableLabel.h \
            ../RS232/rs232.h \
            ../RS232/rs232main.h \
            ../ExtTrig/ExtTrig.h \
            #../ExtTrig/frameobserver.h \
            ../IP/ossmprocessing.h \
            config.h \
            ../ossm_test/IP_test_timing_complete/Constants.h \
            ../ossm_test/IP_test_timing_complete/structures.h \
            ../ossm_test/IP_test_timing_complete/Screw_focus.h \
            ../ossm_test/IP_test_timing_complete/Log.h \
            ../ossm_test/IP_test_timing_complete/DimMesasure.h \
            report_viewer.h \
            ../ossm_test/IP_test_timing_complete/Segmentation.h \
            new_part_config.h \
            defect_label.h \
            defect_display_dialog.h \
            crack_calibration.h \
            groove_calibration.h
           # qled.h \
           # qledplugin.h
        
        FORMS += \
                mainwindow.ui \
            stackedwidget_new.ui \
            report_viewer.ui \
            new_part_config.ui \
            defect_display_dialog.ui \
            crack_calibration.ui \
            groove_calibration.ui
        
        SUBDIRS += \
        
        RESOURCES += \# \
            #qled.qrc
            resource.qrc
        
        #TARGET.path = $$/home/vasu/Qt/Tools/QtCreator/lib/Qt/plugins/designer
        #INSTALLS+=TARGET
        

        [edit: Added coding tags SGaist]

        1 Reply Last reply
        0
        • W Offline
          W Offline
          Wotan
          wrote on 30 Jan 2019, 16:15 last edited by
          #4

          Hello, I am wotan with a similar problem,
          I remember once that I had the same problem as you, and it was because the link was not correctly defined for example on my computer if I do :
          ls /usr/lib/x86_64-linux-gnu/libGL.so*
          the answer is :

             0 lrwxrwxrwx 2 root root   14 nov.   3 23:25 /usr/lib/x86_64-linux-gnu/libGL.so -> libGL.so.1.7.0
             0 lrwxrwxrwx 2 root root   14 nov.   3 23:25 /usr/lib/x86_64-linux-gnu/libGL.so.1 -> libGL.so.1.7.0
          672K -rwxr-xr-x 1 root root 670K nov.   3 23:25 /usr/lib/x86_64-linux-gnu/libGL.so.1.7.0
          

          Check on your side if all the link point on your GL library (so for you it should be pointed on libGL.so.1.2.0)
          Good luck ;-)

          V 1 Reply Last reply 31 Jan 2019, 05:56
          0
          • W Wotan
            30 Jan 2019, 16:15

            Hello, I am wotan with a similar problem,
            I remember once that I had the same problem as you, and it was because the link was not correctly defined for example on my computer if I do :
            ls /usr/lib/x86_64-linux-gnu/libGL.so*
            the answer is :

               0 lrwxrwxrwx 2 root root   14 nov.   3 23:25 /usr/lib/x86_64-linux-gnu/libGL.so -> libGL.so.1.7.0
               0 lrwxrwxrwx 2 root root   14 nov.   3 23:25 /usr/lib/x86_64-linux-gnu/libGL.so.1 -> libGL.so.1.7.0
            672K -rwxr-xr-x 1 root root 670K nov.   3 23:25 /usr/lib/x86_64-linux-gnu/libGL.so.1.7.0
            

            Check on your side if all the link point on your GL library (so for you it should be pointed on libGL.so.1.2.0)
            Good luck ;-)

            V Offline
            V Offline
            vasu_gupta
            wrote on 31 Jan 2019, 05:56 last edited by
            #5

            @Wotan for me it is giving

            /usr/lib/x86_64-linux-gnu/libGL.so

            A 1 Reply Last reply 31 Jan 2019, 10:35
            0
            • V vasu_gupta
              31 Jan 2019, 05:56

              @Wotan for me it is giving

              /usr/lib/x86_64-linux-gnu/libGL.so

              A Offline
              A Offline
              anil_arise
              wrote on 31 Jan 2019, 10:35 last edited by
              #6

              @vasu_gupta check ldd /usr/lib/x86_64-linux-gnu/libGL.so
              may be correctly not linked

              1 Reply Last reply
              0
              • W Offline
                W Offline
                Wotan
                wrote on 2 Feb 2019, 17:56 last edited by
                #7

                Well, for me, I have created a symbolic link to my library:
                # ln -s /usr/lib/x86_64-linux-gnu/libGL.so /lib64/libGL.so
                I am not sure that this is the smartest way to solve it, but it worked !
                Tell me, if it works for you or if you have found something else ...

                1 Reply Last reply
                0

                7/7

                2 Feb 2019, 17:56

                • Login

                • Login or register to search.
                7 out of 7
                • First post
                  7/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved