2012-05-29

QtCreator error: No GL capable X visuals available Fedora 16 Linux


So you are trying to run the example applications in Qt Creator to see if you have installed correctly and you get:

No GL capable X visuals available.

Well, if you are running Fedora 16 with an nVidia graphics card then this link might just help you fix that problem.  The methods described here have only been tested on a Fedora 16 system running Qt Creator 2.5 installed on Qt SDK 1.2.1 and with an nVidia GeForce GT 240 graphics card.  So try at your own risk, because changing your graphics drivers obviously could cause major problems (i.e. you won't be able to see anything!!)

http://www.if-not-true-then-false.com/2011/fedora-16-nvidia-drivers-install-guide-disable-nouveau-driver/

Many thanks to if-not-true-then-false!

Uh oh!  So you did that and it STILL gives you the error.  Well then try this guy's advice.  It worked for me.

http://www.opengl.org/discussion_boards/showthread.php/176711-QGLWidget-under-new-OS-configuration-throws-error

Just look on the left panel of Qt Creator.  Just below the "Debug" bug icon, there is a sideways folder thing called Projects.  Click on it.  At the top you will see a funny looking widget that looks like this:


Make sure you have "Run" clicked.  (I know, right?  Why do they make it like solving some kind of hieroglyphic puzzle in an Indiana Jones movie?  I mean who is looking for a thing that looks like that for switching pages?)  Anyway...

After you make sure you are looking at the Run Settings page.  Scan down and find "Run Environment".  Look over to the right and click on "Details", if it isn't open already, and then scan the list until you find:
LD_LIBRARY_PATH
Click on it and then click on the "Unset" button on the right.

That should do it.  Now go back to the "Welcome" screen of Qt Creator 2.5 and select "Examples" and run one of them.  Works for me.

No warranties or promises here.  Good luck.

Cheers!

UPDATE:  While this did work for the 2dpainting example, I ran into a new problem.  When I tried to open an existing project (of mine) and run it.  I actually copied this project over from another work station.  I copied the entire project folder and placed it in my working directory.

The first problem was that I got this error:
Failed to start program. Path or permissions wrong?

I fixed this by selecting Build>Rebuild project...
Now it tried to run, but then it went back to the error:
QGLTempContext: No GL capable X visuals available.

So I picked up my computer and threw it out the window and...  No wait that was just a daydream.
I went BACK into the Projects>Run Settings (as described above) and found that the LD_LIBRARY_PATH was set again.  I unset it and now it works.  My project was "Set as Active Project" when I did this.  To set any project as "active" just right click on it and click the first selection.  Does this mean that I will have to do this for every project?  Not sure yet.  We shall see......

2 comments:

Let me know what you think!