Posts Tagged ‘libGL’

After the real party (SUAS 13) for this summer, i needed some refreshment. Perhaps, an after-party. After party soon began when i returned back home in July, 2013. It began with me setting up a new QT project in my machine. What that project is about ? Let that remains classified for now. I thought to include all the third party libraries that my project needs with in the project. This means, I did not install third party libraries in default locations but in my project folders. So now when ever I move my project to any other  machine, or say any freshly set up machine, I need not to install any third party libraries that my project needs.  Obviously this is not a great work which I did, but essential for good and a complete software.

To check if my software was really “independent”, i quickly installed virtual box and made a virtual system for Ubuntu 12.04.

Next I updated it and installed Qt5. When I tried to run one of the sample qt project. I got an error. The error was something like “-lGL now found”

It clearly showed that libGL was missing. In order to fix it i found following to install libGL on virtualbox

 sudo apt-get install mesa-common-dev

However for one of my friend with same issue, this also worked:

sudoapt-get install libgl1-mesa-dev

Both  installs dev files for libGL. And now it is all set to run the qt project. Except once, when i still found the same error in newly set up virtual machine. This time error occurred due broken reference to libGL.so.1 by libGL.so.

How did I discover broken link ? I tried to find if my system had any libGL.so file. And yes it did and right on its place. Next I tried to find if it points to correct file. So I used following command:

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

And I found that it points to a file which does not even exist. Hence, the problem was of broken/incorrect links.

So I needed to create a new link where libG.so file points to correct libGL.so.1 file.

I manually searched for libGL.so.1 and found that the file exists in /usr/lib directory.

to recreate the link, i first had to delete old link:

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

This removes my libGL.so file. Now its time to create new one. To create a new link:

sudo ln -s /usr/lib/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so

This resolved my issue.

Advertisements