First verify that you have Nvidia's graphics card (Http://developer.nvidia.com/cuda-gpus this site to see if you have a GPU-capable graphics card):
$ LSPCI | Grep-i nvidia
Check your Linux distributions (mostly 64-bit or 32-bit):
$ uname-m && cat/etc/*release
Check out the GCC version:
$ gcc--version
First download nvidia CUDA warehouse installation package (my is Ubuntu 14.04 64 bit, so download is ubuntu14.04 installation package, if you are 32 bit can see the specific address, the specific address is https:// Developer.nvidia.com/cuda-downloads)
wget Http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-14_amd64.deb
After the download is complete, you can install it using the following command, note that the file name is modified to Cuda-repo-ubuntu1404_6.5-14_amd64.deb
sudo dpkg-i cuda-repo-<distro>_<version>_<architecture>.deb
Once the warehouse is installed, you can update your local repository.
sudo apt-get update
Finally, the installation of Cuda and the graphics driver (the installation of Cuda at the same time the graphics card driver is also installed, this is really convenient.) But the download time is a bit long. )
sudo apt-get install Cuda
It is important to note that the installation methods I provide here are different from the various installation methods on the network, and their methods are often complex
Mainly because: (1) Some tutorials are manual installation of video card drivers, manual shielding system of the default open source drive
(2) The installation of Cuda is also done by hand
There are a few things to keep in mind when using this method:
(1) cuda6.5 already does not support the old graphics card, so sm11 and so on must be deleted. can refer to my other article, about compiling the opencv3.0
(2) ubuntu14.04 is 64 bit, and do not update the system patches at the beginning of what, because the system has been updated, then install the video card driver will not be able to enter the graphical interface, I looked at the relevant log found to be stuck in the Dbus side. Therefore, I recommend that the installation of Ubuntu 14.04 do not update the system patches.
After installation you need to set environment variables:
$ export Path=/usr/local/cuda-6.5/bin: $PATH $ export ld_library_path=/usr/local/cuda-6.5/lib64: $LD _library_path
Once setup is complete, you can also choose whether to install the sample code included with Cuda (<dir> indicates where you want to install, you can replace <dir> with ~):
$ cuda-install-samples-6.5.sh <dir>
Then do some verification work:
View the driver version of the video card
Cat/proc/driver/nvidia/version
View the version of the NVCC compiler
Nvcc-v I
Sample code to compile Cuda:
CD ~/nvidia_cuda-6.5_samples
Then make a compile code.
Enter the bin path to run Devicequery
CD ~/nvidia_cuda-6.5_samples/bin
./Devicequery
The specific installation process can be consulted in English.
Http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html
It is important to emphasize that if the new ubuntu14.04 will not be updated before installing the video driver, it will not be possible to get into the desktop, which has plagued me for a long time. The system was re-installed more than 10 times.
This guide is just a few scattered installation steps and a reminder to Yimeimei about Cuda's pits.
Of course, if you are willing to manually install the video driver and so on, you can refer to: https://ouxinyu.github.io/Blogs/20140723001.html
However, please refer to the official documentation.
ubuntu14.04 installation Cuda