1

I am trying to install (offline installer) Qt 5.4.0 on linux 14.04 "Trusty Tahr" and I keep getting the error message:

Warning: /home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

I've googled and searched and the answer seems to be to install libgl-dev and libglu-dev but they are already installed, per the console messages I see when installing each:

libgl-dev

`Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libgl1-mesa-dev' instead of 'libgl-dev'
libgl1-mesa-dev is already the newest version.
libgl1-mesa-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 598 not upgraded.`

libglu-dev

`Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libglu1-mesa-dev' instead of 'libglu1-mesa-dev' 
libglu1-mesa-dev is already the newest version.
libglu1-mesa-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 598 not upgraded.`

So I see 2 possible problems but don't know how to adress either.

  1. 'libglu1-mesa-dev' is being substituted for 'libglu1-mesa-dev'
  2. libglu1-mesa-dev set to manually installed

Can anyone help me understand what is going on here?

László Papp
  • 51,870
  • 39
  • 111
  • 135
user3577369
  • 43
  • 1
  • 5
  • Perhaps it is better suited for AskUbuntu? – László Papp Dec 27 '14 at 21:15
  • The problem is that my QT5.4.0 install is failing due to the described error and I want to install QT5.4.0 – user3577369 Dec 27 '14 at 21:16
  • Cannot you install it from PPA? Also, well, we cannot be sure how you got the console messages as you have not actually shown the commands that triggered those... – László Papp Dec 27 '14 at 21:17
  • @JohnBerger: isn't Ubuntu supposed to hide such low-level details from you? – László Papp Dec 27 '14 at 21:39
  • Sorry,here are the commands: $ ./qt-opensource-linux-x64-5.4.0.run and sudo apt-get install libqt4-dev and $ sudo apt-get install libgl-dev – user3577369 Dec 27 '14 at 22:06
  • @user3577369: are you joking or is it serious that you are trying to install libqt*4*-dev for Qt 5? – László Papp Dec 27 '14 at 22:18
  • So is libGL.so.1 really exists in system? – folibis Dec 27 '14 at 22:27
  • @user3577369: do you have `libGL.so.1`? `find /usr/lib* -name libGL.so.1`. Also, just in case, you are not mixing 32 bit with 64 bit, right? Either way, `apt-get install libgl1-mesa-dev` should work. – László Papp Dec 27 '14 at 22:29
  • As I remember it have to be some Mesa package, not -dev – folibis Dec 27 '14 at 22:33
  • @folibis: I think you probably mean `libgl1-mesa-dri` for sparing a few megs. user3577369: you can always go dirty and do some `ln -s /usr/lib/something /usr/lib/libGL.so.1` alike hack for experimenting. :P – László Papp Dec 27 '14 at 22:36
  • libGL.so.1 does exist – user3577369 Dec 27 '14 at 23:10
  • "libqt*4*-dev for Qt 5 " there is no libqt5-dev. i tried installing this because of another stackoverflow posting http://stackoverflow.com/questions/15355837/installing-qt-on-linux-cannot-find-lgl – user3577369 Dec 27 '14 at 23:14
  • i've been trying to install the 64 bit version of qt5.4.0. should I just erase that directory and try instaling the 32bit version?. – user3577369 Dec 27 '14 at 23:16
  • @folibis I found libgl1-mesa-dri-lts-trusty installed and am still getting the same error. The error I posted was from the console. The error displayed by the QT5.4.0 installer reads 'Error during installation process (qt.54.gcc_64): Execution failed(Unexpected exit code: 127): "/home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool addQt --id qt.54.gcc_64 --name Qt %{Qt:Version} GCC 64bit --type Qt4ProjectManager.QtVersion.Desktop --qmake /home/bd-01/Qt5.4.0/5.4/gcc_64/bin/qmake"` – user3577369 Dec 27 '14 at 23:23
  • I do not follow. If the library does exist, why cannot it find it? Have you tried to run the suggested `sudo ldconfig` just in case? – László Papp Dec 27 '14 at 23:37
  • @Ipapp Here's what I get when i run `sudo ldconfig` `/sbin/ldconfig.real: /usr/local/lib/python2.7/dist-packages/PySide/libshiboken-python2.7.so.1.2 is not a symbolic link` `/sbin/ldconfig.real: /usr/local/lib/python2.7/dist-packages/PySide/libpyside-python2.7.so.1.2 is not a symbolic link` – user3577369 Dec 28 '14 at 00:15
  • Might the problem be that the installer is expecting `libGL.so.1` in a different directory than where it is: `/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1` – user3577369 Dec 28 '14 at 00:23
  • Like I wrote above, please try `ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/libGL.so.1`. This would probably be even better: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/mesa/ /home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool – László Papp Dec 28 '14 at 03:22
  • if you are sure that libGL.so.1 exists try `ldd -d /path/to/libGL.so.1` to check all its dependencies. – folibis Dec 28 '14 at 04:02
  • @Ipapp I ran the ln -s command and the installer competed. Upon finish, it tries to startr QTCreator , but the console shows this error `Could not initialize GLX` – user3577369 Dec 28 '14 at 04:14
  • 1
    @user3577369: remove the symlink, and try the LD_LIBRARY_PATH command, please. – László Papp Dec 28 '14 at 04:15
  • Can you show the output of `file /home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool` and `uname -m`? – László Papp Dec 28 '14 at 04:23
  • @Ipapp after removing the sym link, but prior to running the LD_LIBRARY_PATH command `bd-01@bd01-Aspire-E1-531:~/Downloads$ file /home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool /home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=92d781342c0f241a3d41ef81f6feda5776adafe7, stripped bd-01@bd01-Aspire-E1-531:~/Downloads$ uname -m x86_64` – user3577369 Dec 28 '14 at 06:23
  • @Ipapp when I run the LD_LIBRARY_PATH command I get the response "No operation requested" and what looks like a man page. This is what I ran: `LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/mesa/ /home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool` – user3577369 Dec 28 '14 at 06:28
  • @user3577369: another question, is there no PPA package for this? – László Papp Dec 28 '14 at 06:32
  • Also, can you run `ldd -r /home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool`? – László Papp Dec 28 '14 at 06:41
  • This is the URL that you used for downloading, yeah? http://download.qt-project.org/official_releases/qt/5.4/5.4.0/qt-opensource-linux-x64-5.4.0.run – László Papp Dec 28 '14 at 06:47
  • Are you getting this in the GUI's output dialog: `Warning: /home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory`? – László Papp Dec 28 '14 at 08:25
  • Also, why not use `sudo apt-get install libgl1-mesa-dev`? It should really fix it! – László Papp Dec 28 '14 at 08:44
  • @Ipapp Yes on the download link. I downladed from this site http://www.qt.io/download-open-source/# selected offline installer, "Qt 5.4.0 for Linux 64-bit (542 MB)" which took me to http://download.qt-project.org/official_releases/qt/5.4/5.4.0/qt-opensource-linux-x64-5.4.0.run – user3577369 Dec 28 '14 at 17:15
  • @Ipapp libgl1-mesa-dev is already installed When I try to execute qtcreator from console I do get the error you mentioned "... No such file or directory" – user3577369 Dec 28 '14 at 17:19
  • Because the installer completed without error and because of the 'cannot find' error, I went back and reran the linking command and rec'd the error: `Could not initialize GLX` here's the screen `$ sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/libGL.so.1 $ qtcreator Starting process: "/usr/bin/cmake" "--help" Could not initialize GLX Aborted (core dumped)` – user3577369 Dec 28 '14 at 17:36
  • The core dump referenced above produced a 'details' window saying I had a multitude of packages out of date. I installed all of them (55) but am still getting the `Could not initialize GLX` message followed by a core dump. – user3577369 Dec 28 '14 at 18:45
  • Looks like its working. I rebooted after installing all those packages and its working now. Thanks to Ipapp and folibis for all your help – user3577369 Dec 28 '14 at 23:56
  • How do I designate an answer and close the issue? – user3577369 Dec 29 '14 at 02:47

1 Answers1

0

Given that you have the following items done proper:

  • sudo apt-get install libgl1-mesa-dev
  • not mixing 32 and 64 bits
  • you used the proper download URL
  • /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 is available
  • etc

... it seems that, as I suspected, your system was b0rked. When you are dealing with packages through the package manager, you need to ensure that the system is in a clean and proper, and not in a broken state.

Things, like apt-get auto remove run means that you system is fundamentally broken and you have to fix your system first before experimenting with packages on top of it.

László Papp
  • 51,870
  • 39
  • 111
  • 135