title: OpenGL code not running : OpenGL GLX extension not supported by display
body: <p>I have to run a code, it includes libraries GL/glut.h and GL/glew.h.
  The code gets compiled well, by the instruction:</p>
  
  <pre><code>$ gcc test.c -lglut -lGLEW -lGL
  </code></pre>
  
  <p>But when I run it, I get the following error:</p>
  
  <pre><code>freeglut (./a.out): OpenGL GLX extension not supported by display ':0.0'
  </code></pre>
  
  <p>The same code did work on my other system, which has suddenly broken down and not even booting, so I HAVE to get it done on this one.</p>
  
  <p>The output of $ glxinfo is:</p>
  
  <pre><code>name of display: :0.0
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  Error: couldn't find RGB GLX visual or fbconfig
  
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  Xlib:  extension "GLX" missing on display ":0.0".
  </code></pre>
  
  <p>Also, the output of $ lspci is:</p>
  
  <pre><code>00:00.0 Host bridge: Intel Corporation Device 0150 (rev 09)
  00:01.0 PCI bridge: Intel Corporation Device 0151 (rev 09)
  00:16.0 Communication controller: Intel Corporation Cougar Point HECI Controller #1 (rev 04)
  00:1a.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #2 (rev 04)
  00:1b.0 Audio device: Intel Corporation Cougar Point High Definition Audio Controller (rev 04)
  00:1c.0 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 1 (rev b4)
  00:1c.5 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 6 (rev b4)
  00:1d.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #1 (rev 04)
  00:1f.0 ISA bridge: Intel Corporation Device 1c5c (rev 04)
  00:1f.2 SATA controller: Intel Corporation Cougar Point 6 port SATA AHCI Controller (rev 04)
  00:1f.3 SMBus: Intel Corporation Cougar Point SMBus Controller (rev 04)
  01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 210] (rev a2)
  01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)
  03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
  </code></pre>
  
  <p>Please help me out, I think the nvidia display drivers aren't properly installed, but I cannot manage to solve this problem. I also have CUDA installed.</p>