g++: error: /lib64/libGL.so: No such file or directory
-
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 -
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@vasu_gupta Can you show your pro file?
-
#------------------------------------------------- # # 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]
-
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 ;-) -
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 ;-)@Wotan for me it is giving
/usr/lib/x86_64-linux-gnu/libGL.so
-
@Wotan for me it is giving
/usr/lib/x86_64-linux-gnu/libGL.so
@vasu_gupta check ldd /usr/lib/x86_64-linux-gnu/libGL.so
may be correctly not linked -
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 ...