How to install CUDA 8 on Ubuntu 18.04 LTS?

12,713

Solution 1

I have solved the issue using the following procedure:

  1. unpack .run file using the command: ./cuda*.run --tar mxvf (or sh ./cuda*.run --tar mxvf)
  2. copy unpacked file InstallUtils.pm to /usr/lib/x86_64-linux-gnu/perl-base
  3. enter command in terminal: export $PERL5LIB

Solution 2

There are two cleaner ways to solve this issue:

  1. Set current directory as perl library search path by: PERL5LIB=. sh cuda_8.0.61_375.26_linux.run your-other-options. Related link.
  2. Install the missing perl module by: sudo apt install module-install-perl. Related link
Share:
12,713
Blue Squirrel
Author by

Blue Squirrel

Updated on September 18, 2022

Comments

  • Blue Squirrel
    Blue Squirrel over 1 year

    Ubuntu 18.04 TLS has moved to CUDA 9.1 now, which deprecates the Nvidia Fermi Architecture.

    I have tried installing the cuda 8 toolkit from nvidia with an --override option (to discard compiler verification) butthe installation failed as follows:

    Command: sudo ./cuda_8.0.61_375.26_linux.run --override --toolkitpath /usr/local/cuda-8.0/

    Output:

    You are attempting to install on an unsupported configuration. Do you wish to continue?
    (y)es/(n)o [ default is no ]: y
    
    Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 375.26?
    (y)es/(n)o/(q)uit: n
    
    Install the CUDA 8.0 Toolkit?
    (y)es/(n)o/(q)uit: y
    
    Enter Toolkit Location
     [ default is /usr/local/cuda-8.0 ]: /usr/local/cuda-8.0
    
    Do you want to install a symbolic link at /usr/local/cuda?
    (y)es/(n)o/(q)uit: y
    
    Install the CUDA 8.0 Samples?
    (y)es/(n)o/(q)uit: y
    
    Enter CUDA Samples Location
     [ default is /home/user ]: 
    
    Installing the CUDA Toolkit in /usr/local/cuda-8.0 ...
    Warning: cannot find Toolkit in /usr/local/cuda-8.0. Use --toolkitpath to specify the toolkit location.
    Installing the CUDA Samples in /home/user ...
    sh: 1: /usr/local/cuda-8.0/bin/cuda-install-samples-8.0.sh: not found
    chown: cannot access '/home/user/NVIDIA_CUDA-8.0_Samples': No such file or directory
    
    ===========
    = Summary =
    ===========
    
    Driver:   Not Selected
    Toolkit:  Installation Failed
    Samples:  Installation Failed
    
    • francescop21
      francescop21 over 5 years
      Apparently, you need to specify the toolkit location using option --toolkitpath.
    • Blue Squirrel
      Blue Squirrel over 5 years
      I have already tried. Added my command in the post.
    • francescop21
      francescop21 over 5 years
      Actually, you don't need that option, since you're installing in the default directory. Have you uninstalled any previous version of Cuda Toolkit?
    • Blue Squirrel
      Blue Squirrel over 5 years
      I have tried without the option --toolkitpath, and I was getting the same error. Indeed, I have installed the default nvidia-cuda-toolkit 9.1 from the ubuntu 18.04 repos. But I removed it after realizing my architecture was deprecated.
    • francescop21
      francescop21 over 5 years
      Make sure that there are no files remaining from the cuda 9.1 installation.
  • nairouz mrabah
    nairouz mrabah about 4 years
    Thank you so much.