Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just done a fresh install of 11.10, + nvidia-current from xswat ppa (cause the current version shipped with ubuntu is broken for my gpu).

Please take time for understanding each steps. I don't know where to report this issue.

Installation of nvidia-current[-dev]

After installing nvidia-current and nvidia-current-dev, theses files are missing:


Both are installed into:


By default, theses are not accessible though standard path, and broke compilation to many software. (no gl.h found, then no -lGL found.)

Broken in design solution

To fix that, we need to install libgl1-dev. libgl1-dev install mesa gl.h in /usr/include/GL/gl.h and install mesa in /usr/lib/

With libgl1-dev, i'm able to compile gl related software. But after compilation, i can see that nvidia libGL is used:

$ ldd mysoftware => /usr/lib/nvidia-current/ (0x00007f620d78c000)


  • we need libgl1-mesa-dev to be able to compile gl-related software by default
  • we don't use nvidia header at compilation, but mesa header
  • we don't use any mesa lib at runtime


  • Why should i install Mesa development since i already got everything on my computer ?
  • Should ubuntu need to install or symlink nvidia libs and header in standard location if mesa are not installed ?
share|improve this question

closed as too localized by Jorge Castro, LnxSlck, bodhi.zazen, Mik, qbi Feb 8 '13 at 20:08

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This is exactly my problem, but what's under solution is unintelligible. What does "we need to install libgl1-dev. libgl1-dev install mesa gl.h in /usr/include/GL/gl.h and install mesa in /usr/lib/" mean? The first line is understandable to me. It should be: "Execute (from the console): sudo apt-get install libgl1-dev. The second sentence however, I cannot find verb nor subject in. Please restate this so that I can compile an application using openGL. – user54311 Apr 10 '12 at 15:46