INSTALL CUDA 2.3 ON UBUNTU 9.10
BY TOGNU
1. Open a terminal and paste the following commands to add the Launchpad repository:
-Ubuntu Karmic Koala
sudo add-apt-repository ppa:nvidia-vdpau/ppa -Ubuntu Jaunty Jackalope, Intrepid Ibex, Hardy Heron:
sudo sh -c “echo 'deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu UBUNTU_VERSION main' >> /etc/apt/sources.list”
sudo sh -c “echo 'deb-src http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu UBUNTU_VERSION main' >> /etc/apt/sources.list”
In the two lines above, replace UBUNTU_VERSION with your Ubuntu version (in lowercase: jaunty, intrepid or hardy).
2. Import the GPG key (skip this for Karmic Koala if you used the add-apt-repository command):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CEC06767 3. Now you can install the Nvidia 190.xx stable drivers:
sudo apt-get update && sudo apt-get install nvidia-190-modaliases nvidia-glx-190 or 185.xx:
sudo apt-get update && sudo apt-get install nvidia-185-modaliases nvidia-glx-185 Install the drive using envyng
Code:
sudo apt-get install envyng-core; envyng -t
use the option 1 Install the Nvidia driver,now the option 0 and restart you computer.
The new driver its showed
well, now open a terminal and put in
Code:
sudo apt-get install build-essential libglut3-devsudo sudo apt-get install mesa-common-dev freeglut3-dev glutg3-dev libglut3
Furthermore we also need to get 3 more packages namely
sudo apt-get install libxmu-dev
sudo apt-get install libxmu-headers
sudo apt-get install libxi-dev
These can be installed with sudo apt-get in a terminal or by finding them in synaptic.
With these downloaded and installed we can continue and install the Nvidia driver. Note that this is on a fresh install and there are more steps to be taken if you are doing it with an older Nvidia driver already installed. There are already posts on the forum about that so I wont go into that here.
Next we need to install the toolkit. To do this we open a terminal and type in
Code:
chmod +x ./cudatoolkit_2.3_linux_64_ubuntu9.04.run sudo ./cudatoolkit_2.3_linux_64_ubuntu9.04.run
You get to pick your install directory, here I will assume its in the default.
The next step is to add the necessary environment variables. In a terminal type in this. (Just type or copy it in one line at a time!)
Code:
echo "# CUDA stuff PATH=\$PATH:/usr/local/cuda/bin
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda/lib64
export PATH
export LD_LIBRARY_PATH" >> ~/.bashrc
Like the toolkit installer says, if you run a 32 bit version you must leave out the 64 part.
Next we install the SDK. In a terminal type in the following.
Code:
chmod +x ./cudasdk_2.3_linux.run ./cudasdk_2.3_linux.run
You dont need to be a superuser to install this.
First you get asked where you want to put the files, and where the CUDA toolkit was installed. (Check that this dir is the same as the one you installed it in, even if it says it located it. The dir need to be the same and not have additions of nvcc or the like!)
Last we need to compile the SDK files. In a terminal type (I assume default install dir)
Code:
sudo apt-get install gcc-4.1 g++-4.1 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.1 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.1 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4
cd NVIDIA_GPU_Computing_SDK/C make
Now it should unpack everything succesfully. You may get a lot of warnings during the process, but these can safely be ignored.
Once it is done you can test that everything does in fact work by going into
Code:
cd NVIDIA_GPU_Computing_SDK/C/bin/linux/release/