The installation described here was done the 10/26/2016 on a freshen udpate system by using :
We first install the nvidia driver version 367.
To avoid some warning messages in CUDA installation, we install ubuntu packages libxi-dev, libxmu-dev and libglu1-mesa-dev
To avoid some error messages when using nvcc compiler
We reboot the computer and now we really can install CUDA 8.0. As we want to conserve previous CUDA installation, we don’t use .deb or .rpm packages and we choose the runfile (local) version from https://developer.nvidia.com/cuda-download. So we obtain the file cuda_8.0.44_linux-run
chmod u+x cuda_8.0.44_linux-run sudo ./cuda_8.0.44_linux-run --silent --toolkit --samples --samplespath=/usr/local/cuda-8.0/samples --override
Due to an unsupported compiler (version 5.4.0), I use –override option for CUDA 6.5 to 7.5 installation.
chmod u+x cuda_*.run sudo ./cuda_6.5.14_linux_64.run --silent --verbose --toolkit --samples --samplespath=/usr/local/cuda-6.5/samples --override sudo ./cuda_7.0.28_with_346.75_linux.run --silent --verbose --toolkit --samples --samplespath=/usr/local/cuda-7.0/samples --override sudo ./cuda_7.5.18_linux.run --silent --verbose --toolkit --samples --samplespath=/usr/local/cuda-7.5/samples --override sudo ./cuda_8.0.44_linux-run --silent --verbose --toolkit --samples --samplespath=/usr/local/cuda-8.0/samples
Verify that the symbolic link /usr/local/cuda is linked to the default version you want otherwise correct it. For example :
Please make sure that
PATH includes /usr/local/cuda-<CUDA_VERSION>/bin
LD_LIBRARY_PATH includes /usr/local/cuda-<CUDA_VERSION>/lib64
where <CUDA_VERSION> must be replaced by the version you want to use.