Ubuntu – Has anyone successfully installed CUDA 7.5 on Ubuntu 14.04.3 LTS x86_64

14.04cudanvidia

My workstation has two GPUs (Quadro K5200 and Quadro K2200) with the latest NVIDIA Driver installed (Version: 352.41). After downloaded the file cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb from CUDA 7.5 Downloads, I try to install it, but it turns out the result as below:

root@P700-Bruce:/home/bruce/Downloads# sudo apt-get install cuda
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 cuda : Depends: cuda-7-5 (= 7.5-18) but it is not going to be installed
 unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                        Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I have tried the solution:

  1. sudo apt-get remove nvidia-cuda-* # remove old nvidia-cuda packages
  2. Install unmet dependencies:

    root@P700-Bruce:/home/bruce/Downloads# apt-get install cuda-7-5
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     cuda-7-5 : Depends: cuda-toolkit-7-5 (= 7.5-18) but it is not going to be installed
                Depends: cuda-runtime-7-5 (= 7.5-18) but it is not going to be installed
     unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                            Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
    
    root@P700-Bruce:/home/bruce/Downloads# apt-get install cuda-toolkit-7-5
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     cuda-toolkit-7-5 : Depends: cuda-core-7-5 (= 7.5-18) but it is not going to be installed
                        Depends: cuda-command-line-tools-7-5 (= 7.5-18) but it is not going to be installed
                        Depends: cuda-samples-7-5 (= 7.5-18) but it is not going to be installed
                        Depends: cuda-documentation-7-5 (= 7.5-18) but it is not going to be installed
                        Depends: cuda-visual-tools-7-5 (= 7.5-18) but it is not going to be installed
     unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                            Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
    
  3. Install and use aptitude

My Ubuntu14.04 OS is just installed and have made the software updates and installed the latest Nvidia driver.

Can you give some help? Thanks in advance!

Best Answer

The installation of CUDA is little a bit tricky. I've followed the following steps and it works for me. You can refer to this link also.

Confirmation of the environment:

  1. lspci | grep -i nvidia (Confirm that the information of NVIDIA's board is displayed)

  2. uname -m (make sure that it is a x86_64)

  3. gcc --version (make sure it is installed)

Installation of CUDA –

  1. Download cuda_7.5.18_linux.run file from https://developer.nvidia.com/cuda-downloads

  2. Run the following commands:

    sudo apt-get install build-essential
    echo blacklist nouveau option nouveau modeset=0 |sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf 
    sudo update-initramfs -u
    
  3. Reboot computer

  4. At login screen, press Ctrl+Alt+F1and login to your user.

  5. Go to the directory where you have the CUDA driver, and run

    chmod a+x .
    sudo service lightdm stop
    sudo bash cuda-7.5.18_linux.run --no-opengl-libs
    
  6. During installation:

    • Accept EULA conditions
    • Say YES to installing the NVIDIA driver
    • Say YES to installing CUDA Toolkit + Driver
    • Say YES to installing CUDA Samples
    • Say NO rebuilding any Xserver configurations with Nvidia
  7. Check if /dev/nvidia* files exist. If they don't, do the following

    sudo modprobe nvidia
    
  8. Set Environment path variables

    export PATH=/usr/local/cuda-7.5/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
    
  9. Verify the driver version

    cat /proc/driver/nvidia/version`
    
  10. Check CUDA driver version

    nvcc –V
    
  11. Switch the lightdm back on again

    sudo service lightdm start
    
  12. Ctrl+Alt+F7 and login to the system through GUI

  13. Create CUDA Samples, Go to NVIDIA_CUDA-7.5_Samples folder through terminal, then run following command:

    make
    cd bin/x86_64/linux/release/
    ./deviceQuery
    ./bandwidthTest
    

    Both tests should ultimately output a 'PASS' in terminal

  14. Reboot the system

Related Question