I have a problem with installing Cuda toolkit on Ubuntu 13.04 64 bit.
I am downloading the package with CUDA Toolkit 11.7 Update 1 Downloads | NVIDIA Developer
Then I stop the x server and run the installer (with sudo).
I get the error with the driver:
ERROR: The kernel header file
'/lib/modules/3.8.0-25-generic/build/include/linux/version.h' does
not exist. The most likely reason for this is that the kernel
source files in '/lib/modules/3.8.0-25-generic/build' have not been
configured.
And to save time, there’s the summary of what I have done.
Installed the packages linux-headers, linux-source, build-essential and some more suggested on different forums.
Tried simlinking that header file location (it really does not exist) to the location I found it on my system (/usr/src/linux-headers-3.8.0-25-generic/include/generated/uapi/linux/version.h). In this case the installation failed with no error provided.
Personally, I would completely PURGE Unity from Ubuntu 12.04/12.10 and 13.04/13.10 versions BEFORE installing Cuda 5.0 and MANUALLY installing the latest Nvidia driver. The Unity package in my experience has never played nice with CUDA toolkits or the proprietary Nvidia driver. Moreover, the Unity package will typically steal some bandwidth away from Cuda programs by way of 3d Compiz routines. Just saying.
Ubuntu frequently gives u problems when trying to install Cuda. I would suggest u switch to Debian GNU/Linux which supports cuda 5.0. I have used both and found Debian GNU/Linux to be better.
Ultimately, you should have a symlink from /usr/src/linux pointing to /usr/src/linux-headers-$(uname -r).
In addition, you should have a symlink from /lib/modules/$(uname -r)/build pointing to /usr/src/linux-headers-$(uname -r).
I would recommend verifying that you have the proper linux-headers packages installed, and creating these symlinks. Then uninstalling nvidia-current and reinstalling nvidia-current.