Qt-Creator does not start
-
Hello, I just had a fresh new install of Qt 6.2.2 on Ubuntu 20.04.3 LTS, and at the first attempt of running Qt-Creator it logs out the error below and the application does not start!
./qtcreator: error while loading shared libraries: libOpenGL.so.0: cannot open shared object file: No such file or directory
What can I don to fix this? Thanks in advance
-
Install OpenGL drivers (
sudo apt install libx11-xcb-dev libglu1-mesa-dev
).You can also launch Qt Creator without plugins by running it with flags:
-noload QmlProfiler -noload QuickDesigner
. https://doc.qt.io/qtcreator/creator-faq.html -
I tried to install the suggested packages, but they turned out to be already installed!
Me@Me:~$ sudo apt install libx11-xcb-dev libglu1-mesa-dev Reading package lists... Done Building dependency tree Reading state information... Done libx11-xcb-dev is already the newest version (2:1.6.9-2ubuntu1.2). libglu1-mesa-dev is already the newest version (9.0.1-1build1). libglu1-mesa-dev set to manually installed. The following packages were automatically installed and are no longer required: libllvm11 libqt5x11extras5 qml-module-qtquick-dialogs qml-module-qtquick-privatewidgets shim Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Anything else I can do?
-
-
That's weird. Can you run any other 3D app, like
glxgears
(it's part ofmesa-utils
)?Run
locate libOpenGL.so
to see where it is. -
- Find out whether you have a
libOpenGL.so.0
- Assuming so, run an
ldd
on it to see if it has any missing dependencies. - If
qtcreator
cannot locate it, set environment variableQT_DEBUG_PLUGINS=1
and run it to check if diagnostic output tells you anything about where it is looking (not sure whether this step applies, but you can always try it).
- Find out whether you have a
-
this is what locate command returned:
locate libOpenGL.so /snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu/libOpenGL.so /snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu/libOpenGL.so.0 /snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0 /snap/gnome-3-34-1804/77/usr/lib/x86_64-linux-gnu/libOpenGL.so /snap/gnome-3-34-1804/77/usr/lib/x86_64-linux-gnu/libOpenGL.so.0 /snap/gnome-3-34-1804/77/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0 /snap/gnome-3-38-2004/87/usr/lib/x86_64-linux-gnu/libOpenGL.so /snap/gnome-3-38-2004/87/usr/lib/x86_64-linux-gnu/libOpenGL.so.0 /snap/gnome-3-38-2004/87/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
what can I do to make
qtcreator
be aware of it's location? -
That looks like a sandbox for some snap app. You could try adding that to LD path:
export LD_LIBRARY_PATH=/snap/gnome-3-38-2004/87/usr/lib/x86_64-linux-gnu ./qtcreator
But it would be better to install OpenGL for the whole system, not only for that snap package.
-
Go to system settings or software sources and find "Additional Drivers" - there select proper driver for your GPU.
Or you can install a software renderer with mesa, but sorry I don't remember the package name. It's definitely much better to pick proper GPU driver instead.
-
I have an Intel Graphic card, and from Ubuntu' forum I understood that Intel Graphics driver's are preinstalled in the kernel, thus it shouldn't be a GPU driver issue.
And to give you some more info, I just installqtcreator 4.11.0
from Ubuntu package manager and it runs without issues, the problem appears only with the newest version I installed from Qt-website -
Oh hey, this is a Qt C bug! It's fixed in Creator 6.0.1: https://www.qt.io/blog/qt-creator-6.0.1-released