Can't install Cuba on Ubuntu 13.04 64bit

Greetings!

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.

  • Verified that that is the version of my kernel
  • Updated everything (sudo upt-get update, sudo apt-get upgrade)
  • 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.

Any ideas of what else can be done?

I am also having the exact same problem if anyone can help that would be great

Keep in mind that Ubuntu 13.04 is not a supported platform for CUDA 5.0 or CUDA 5.5.

Something you could try is this:
cd /usr/src/linux
sudo make cloneconfig
sudo make prepare

I see… Any downgrade suggestion?

I do not have /usr/src/linux/
I have /usr/src/linux-source-3.8.0 and tar.bz inside. Doe in make sense to unpack it and try your commands?

And thank you for your answer!

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.

Also keep in mind that Debian is not a supported platform. (See http://developer.download.nvidia.com/compute/cuda/5_5/rc/docs/CUDA_Toolkit_Release_Notes.pdf for the list of supported distros for each release).

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.

In case you haven’t solved this issue, link below might be helpful:
http://blog.bloemsaat.com/2013/03/17/installing-cuda-on-ubuntu-13-04-raring-ringtail/

I think the keypoint might be:
sudo update-alternatives --config gcc #choose 4.4.x
and:
sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so