So I wanted to install my NVIDIA drivers and I knew it would ask for some awesome kernel headers.
In operating systems that use yum, you could use:
<pre class="wp-code-highlight prettyprint">yum install kernel-headers</pre><p></p>
You may also want to try:
<pre class="wp-code-highlight prettyprint">yum groupinstall "Development Tools"</pre><p></p>
..which will install development tools on your system.
But in Debian/Ubuntu based distributions, you should use the following which installs “build-essential” packages which will help provide NVIDIA and other driver based installers everything they need to tailor the driver for your system including gcc, make, and dpkg-dev.
<pre class="wp-code-highlight prettyprint">apt-get install build-essential linux-headers-2.6.32-5-all-amd64</pre><p></p>
After this, just drop to a tty session, stop gdm/X, make the NVIDIA installer executable, and run it.
Have fun.
Of course be sure to sub in your kernel type and architecture.