When I first tried to manually install the proprietary nvidia driver I encountered the following error:
The CC version check failed: The compiler used to compile the kernel (gcc 4.6) does not exactly match the current compiler (gcc 4.7). The Linux 2.6 kernel module loader rejects kernel modules built with a version of gcc that does not exactly match that of the compiler used to build the running kernel.
After some digging I found a nice solution for this problem:
Download proprietary nvidia driver
Download the latest 64-bit version of the proprietary nvidia driver. I got the following file:
NVIDIA-Linux-x86_64-331.67.run
Prepare your system
- Install the desired version of gcc:
sudo apt-get install gcc-4.6
- Enable gcc to be switched between versions via update-alternatives
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20
- Switch to gcc version 4.6
sudo update-alternatives --config gcc
Install the driver
You should be able to install the proprietary nvidia driver now without a warning about a wrong gcc version
sudo ./NVIDIA-Linux-x86_64-331.67.run
Clean up
Switch back to the original version of gcc:
sudo update-alternatives --config gcc
Nice guide. Thanks for taking the time to write it, I managed to get everything setup my end.