How can I install CUDA 9 on Ubuntu 17.10
up vote
36
down vote
favorite
Ubuntu 17.10 comes with CUDA 8 which relies on clang 3.8
(e.g. see this blogpost).
However, I'd like to install CUDA 9 and rely on GCC if possible. How can I do this?
cuda 17.10
add a comment |
up vote
36
down vote
favorite
Ubuntu 17.10 comes with CUDA 8 which relies on clang 3.8
(e.g. see this blogpost).
However, I'd like to install CUDA 9 and rely on GCC if possible. How can I do this?
cuda 17.10
add a comment |
up vote
36
down vote
favorite
up vote
36
down vote
favorite
Ubuntu 17.10 comes with CUDA 8 which relies on clang 3.8
(e.g. see this blogpost).
However, I'd like to install CUDA 9 and rely on GCC if possible. How can I do this?
cuda 17.10
Ubuntu 17.10 comes with CUDA 8 which relies on clang 3.8
(e.g. see this blogpost).
However, I'd like to install CUDA 9 and rely on GCC if possible. How can I do this?
cuda 17.10
cuda 17.10
asked Oct 21 '17 at 19:05
B0rk4
7931712
7931712
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
51
down vote
accepted
Installation of NVIDIA driver 384
First we install a fresh Ubuntu 17.10 on a computer with an NVIDIA GPU and select "Install third-party software" during the process. Alternatively, we can add the graphics drivers repository manually:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
Then we install the most recent NVIDIA driver using apt:
sudo apt install nvidia-384 nvidia-384-dev
We verify the installation by running:
nvidia-smi
We should see an output which lists the NVIDIA 384 driver and our discrete NVIDIA GPU - similar to summarized table below:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90 Driver Version: 384.90 |
| |
|-------------------------------+----------------------+----------------------+
| 0 Quadro M500M Off | 00000000:06:00.0 Off | N/A |
| N/A 48C P0 N/A / N/A | 943MiB / 2002MiB | 26% Default |
+-------------------------------+----------------------+----------------------+
Preparation for installing of CUDA 9 + SDK
We install a number of build/dev packages which we require later:
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
We notice that the default gcc/g++ version on 17.10 is 7.2.0 (Ubuntu 7.2.0-8ubuntu3)
:
gcc -v
CUDA 9 requires gcc 6. Thus, we install it:
sudo apt install gcc-6
sudo apt install g++-6
Note that the default gcc version is still 7.2
; can be checked by running gcc -v
again.
Installation of CUDA 9 + SDK
From the CUDA Toolkit Archive, select one of the "runfile (local)" installation packages to download a version of CUDA 9, such as
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Make the downloaded file executable and run it using sudo:
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
We install CUDA with the following configurations:
You are attempting to install on an unsupported configuration. Do you wish to continue?
y
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
n
Install the CUDA 9.0 Toolkit?
y
Enter Toolkit Location
[default location]
Do you want to install a symbolic link at /usr/local/cuda?
y
Install the CUDA 9.0 Samples?
y
Enter CUDA Samples Location
[default location]
Set up symlinks for gcc/g++:
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++
Test the CUDA 9 installation using the SDK
Build your favorite CUDA sample and run it:
cd ~/NVIDIA_CUDA-9.0_Samples/5_Simulations/smokeParticles
make
../../bin/x86_64/linux/release/smokeParticles
You may like to set up gcc/g++ symlinks after the cuda install.
1
Been stuck on this issue for a bit. Running 17.10, trying to install CUDA 9. I'm having an issue on step 2: nvidia-smiNVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Ranlspci | grep -i nvidia
says I have a GeForce GTX 760.mokutil --sb-state
shows SecureBoot disabled. Ransudo apt-get purge nvidia*
, ran your install command for 384, and randpkg -S nvidia-smi
nvidia-384: /usr/lib/nvidia-384/bin/nvidia-smi. Any suggestions?
– Clark Kent
Oct 23 '17 at 2:53
4
I had to do eithersudo ln -s /usr/bin/gcc-6 /usr/local/cuda-9.0/bin/gcc sudo ln -s /usr/bin/g++-6 /usr/local/cuda-9.0/bin/g++
orsudo ./cuda_9.0.176_384.81_linux-run --override
as author below recommends to install successfully without compiler conflict
– yauheni_selivonchyk
Nov 3 '17 at 4:22
11
the two commands to add the symbolic links for the gcc 6 compilers have to be done after installing cuda, because /usr/local/cuda does not exist before installing
– Luis Lobo Borobia
Nov 20 '17 at 2:32
1
Helper a lot! The only thing I did in another way - created symlinks after cuda installation at the very end.
– QtRoS
Dec 2 '17 at 16:47
1
Prior to runningcuda_9.0.176_384.81_linux.run
, how did you create the soft links (ln -s
)? Did you manually create the cuda folder?
– mahmood
Mar 17 at 6:09
|
show 11 more comments
up vote
5
down vote
Getting this installed took more time than I would like to admit, and while the above answer is a good template, I had some additional steps required for my fresh install of Ubuntu 17.10:
blacklist nouveau
sudo vim /etc/modprobe.d/blacklist.conf
Add the following:
# this one might not be required for x86 32 bit users.
blacklist amd76x_edac
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
Update initramfs disk
sudo update-initramfs -u
Stop gdm3
sudo /etc/init.d/gdm3 stop
sudo init 3
Get content
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-384 nvidia-384-dev
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
nvidia-smi
Get the package
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Run with --override to override compiler choice
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
After installing the package, I would get errors with nvidia-smi, so I suggest running the command again to verify it works. When I had issues, I would purge nvidia* and re-get it.
nvidia-smi
Some people may need to stoplightdm
instead ofgdm3
, see askubuntu.com/a/65867/422690
– crypdick
Jul 3 at 23:06
add a comment |
up vote
0
down vote
I followed the accepted answer (@ubashu) and everything went well (if not exactly the same, the instructions would lead to the correct path). I would only had the export to Path (as specified also on https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions)
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
After that you can use nvcc -V to check if the install really went well.
New contributor
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
51
down vote
accepted
Installation of NVIDIA driver 384
First we install a fresh Ubuntu 17.10 on a computer with an NVIDIA GPU and select "Install third-party software" during the process. Alternatively, we can add the graphics drivers repository manually:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
Then we install the most recent NVIDIA driver using apt:
sudo apt install nvidia-384 nvidia-384-dev
We verify the installation by running:
nvidia-smi
We should see an output which lists the NVIDIA 384 driver and our discrete NVIDIA GPU - similar to summarized table below:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90 Driver Version: 384.90 |
| |
|-------------------------------+----------------------+----------------------+
| 0 Quadro M500M Off | 00000000:06:00.0 Off | N/A |
| N/A 48C P0 N/A / N/A | 943MiB / 2002MiB | 26% Default |
+-------------------------------+----------------------+----------------------+
Preparation for installing of CUDA 9 + SDK
We install a number of build/dev packages which we require later:
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
We notice that the default gcc/g++ version on 17.10 is 7.2.0 (Ubuntu 7.2.0-8ubuntu3)
:
gcc -v
CUDA 9 requires gcc 6. Thus, we install it:
sudo apt install gcc-6
sudo apt install g++-6
Note that the default gcc version is still 7.2
; can be checked by running gcc -v
again.
Installation of CUDA 9 + SDK
From the CUDA Toolkit Archive, select one of the "runfile (local)" installation packages to download a version of CUDA 9, such as
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Make the downloaded file executable and run it using sudo:
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
We install CUDA with the following configurations:
You are attempting to install on an unsupported configuration. Do you wish to continue?
y
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
n
Install the CUDA 9.0 Toolkit?
y
Enter Toolkit Location
[default location]
Do you want to install a symbolic link at /usr/local/cuda?
y
Install the CUDA 9.0 Samples?
y
Enter CUDA Samples Location
[default location]
Set up symlinks for gcc/g++:
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++
Test the CUDA 9 installation using the SDK
Build your favorite CUDA sample and run it:
cd ~/NVIDIA_CUDA-9.0_Samples/5_Simulations/smokeParticles
make
../../bin/x86_64/linux/release/smokeParticles
You may like to set up gcc/g++ symlinks after the cuda install.
1
Been stuck on this issue for a bit. Running 17.10, trying to install CUDA 9. I'm having an issue on step 2: nvidia-smiNVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Ranlspci | grep -i nvidia
says I have a GeForce GTX 760.mokutil --sb-state
shows SecureBoot disabled. Ransudo apt-get purge nvidia*
, ran your install command for 384, and randpkg -S nvidia-smi
nvidia-384: /usr/lib/nvidia-384/bin/nvidia-smi. Any suggestions?
– Clark Kent
Oct 23 '17 at 2:53
4
I had to do eithersudo ln -s /usr/bin/gcc-6 /usr/local/cuda-9.0/bin/gcc sudo ln -s /usr/bin/g++-6 /usr/local/cuda-9.0/bin/g++
orsudo ./cuda_9.0.176_384.81_linux-run --override
as author below recommends to install successfully without compiler conflict
– yauheni_selivonchyk
Nov 3 '17 at 4:22
11
the two commands to add the symbolic links for the gcc 6 compilers have to be done after installing cuda, because /usr/local/cuda does not exist before installing
– Luis Lobo Borobia
Nov 20 '17 at 2:32
1
Helper a lot! The only thing I did in another way - created symlinks after cuda installation at the very end.
– QtRoS
Dec 2 '17 at 16:47
1
Prior to runningcuda_9.0.176_384.81_linux.run
, how did you create the soft links (ln -s
)? Did you manually create the cuda folder?
– mahmood
Mar 17 at 6:09
|
show 11 more comments
up vote
51
down vote
accepted
Installation of NVIDIA driver 384
First we install a fresh Ubuntu 17.10 on a computer with an NVIDIA GPU and select "Install third-party software" during the process. Alternatively, we can add the graphics drivers repository manually:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
Then we install the most recent NVIDIA driver using apt:
sudo apt install nvidia-384 nvidia-384-dev
We verify the installation by running:
nvidia-smi
We should see an output which lists the NVIDIA 384 driver and our discrete NVIDIA GPU - similar to summarized table below:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90 Driver Version: 384.90 |
| |
|-------------------------------+----------------------+----------------------+
| 0 Quadro M500M Off | 00000000:06:00.0 Off | N/A |
| N/A 48C P0 N/A / N/A | 943MiB / 2002MiB | 26% Default |
+-------------------------------+----------------------+----------------------+
Preparation for installing of CUDA 9 + SDK
We install a number of build/dev packages which we require later:
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
We notice that the default gcc/g++ version on 17.10 is 7.2.0 (Ubuntu 7.2.0-8ubuntu3)
:
gcc -v
CUDA 9 requires gcc 6. Thus, we install it:
sudo apt install gcc-6
sudo apt install g++-6
Note that the default gcc version is still 7.2
; can be checked by running gcc -v
again.
Installation of CUDA 9 + SDK
From the CUDA Toolkit Archive, select one of the "runfile (local)" installation packages to download a version of CUDA 9, such as
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Make the downloaded file executable and run it using sudo:
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
We install CUDA with the following configurations:
You are attempting to install on an unsupported configuration. Do you wish to continue?
y
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
n
Install the CUDA 9.0 Toolkit?
y
Enter Toolkit Location
[default location]
Do you want to install a symbolic link at /usr/local/cuda?
y
Install the CUDA 9.0 Samples?
y
Enter CUDA Samples Location
[default location]
Set up symlinks for gcc/g++:
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++
Test the CUDA 9 installation using the SDK
Build your favorite CUDA sample and run it:
cd ~/NVIDIA_CUDA-9.0_Samples/5_Simulations/smokeParticles
make
../../bin/x86_64/linux/release/smokeParticles
You may like to set up gcc/g++ symlinks after the cuda install.
1
Been stuck on this issue for a bit. Running 17.10, trying to install CUDA 9. I'm having an issue on step 2: nvidia-smiNVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Ranlspci | grep -i nvidia
says I have a GeForce GTX 760.mokutil --sb-state
shows SecureBoot disabled. Ransudo apt-get purge nvidia*
, ran your install command for 384, and randpkg -S nvidia-smi
nvidia-384: /usr/lib/nvidia-384/bin/nvidia-smi. Any suggestions?
– Clark Kent
Oct 23 '17 at 2:53
4
I had to do eithersudo ln -s /usr/bin/gcc-6 /usr/local/cuda-9.0/bin/gcc sudo ln -s /usr/bin/g++-6 /usr/local/cuda-9.0/bin/g++
orsudo ./cuda_9.0.176_384.81_linux-run --override
as author below recommends to install successfully without compiler conflict
– yauheni_selivonchyk
Nov 3 '17 at 4:22
11
the two commands to add the symbolic links for the gcc 6 compilers have to be done after installing cuda, because /usr/local/cuda does not exist before installing
– Luis Lobo Borobia
Nov 20 '17 at 2:32
1
Helper a lot! The only thing I did in another way - created symlinks after cuda installation at the very end.
– QtRoS
Dec 2 '17 at 16:47
1
Prior to runningcuda_9.0.176_384.81_linux.run
, how did you create the soft links (ln -s
)? Did you manually create the cuda folder?
– mahmood
Mar 17 at 6:09
|
show 11 more comments
up vote
51
down vote
accepted
up vote
51
down vote
accepted
Installation of NVIDIA driver 384
First we install a fresh Ubuntu 17.10 on a computer with an NVIDIA GPU and select "Install third-party software" during the process. Alternatively, we can add the graphics drivers repository manually:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
Then we install the most recent NVIDIA driver using apt:
sudo apt install nvidia-384 nvidia-384-dev
We verify the installation by running:
nvidia-smi
We should see an output which lists the NVIDIA 384 driver and our discrete NVIDIA GPU - similar to summarized table below:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90 Driver Version: 384.90 |
| |
|-------------------------------+----------------------+----------------------+
| 0 Quadro M500M Off | 00000000:06:00.0 Off | N/A |
| N/A 48C P0 N/A / N/A | 943MiB / 2002MiB | 26% Default |
+-------------------------------+----------------------+----------------------+
Preparation for installing of CUDA 9 + SDK
We install a number of build/dev packages which we require later:
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
We notice that the default gcc/g++ version on 17.10 is 7.2.0 (Ubuntu 7.2.0-8ubuntu3)
:
gcc -v
CUDA 9 requires gcc 6. Thus, we install it:
sudo apt install gcc-6
sudo apt install g++-6
Note that the default gcc version is still 7.2
; can be checked by running gcc -v
again.
Installation of CUDA 9 + SDK
From the CUDA Toolkit Archive, select one of the "runfile (local)" installation packages to download a version of CUDA 9, such as
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Make the downloaded file executable and run it using sudo:
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
We install CUDA with the following configurations:
You are attempting to install on an unsupported configuration. Do you wish to continue?
y
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
n
Install the CUDA 9.0 Toolkit?
y
Enter Toolkit Location
[default location]
Do you want to install a symbolic link at /usr/local/cuda?
y
Install the CUDA 9.0 Samples?
y
Enter CUDA Samples Location
[default location]
Set up symlinks for gcc/g++:
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++
Test the CUDA 9 installation using the SDK
Build your favorite CUDA sample and run it:
cd ~/NVIDIA_CUDA-9.0_Samples/5_Simulations/smokeParticles
make
../../bin/x86_64/linux/release/smokeParticles
You may like to set up gcc/g++ symlinks after the cuda install.
Installation of NVIDIA driver 384
First we install a fresh Ubuntu 17.10 on a computer with an NVIDIA GPU and select "Install third-party software" during the process. Alternatively, we can add the graphics drivers repository manually:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
Then we install the most recent NVIDIA driver using apt:
sudo apt install nvidia-384 nvidia-384-dev
We verify the installation by running:
nvidia-smi
We should see an output which lists the NVIDIA 384 driver and our discrete NVIDIA GPU - similar to summarized table below:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90 Driver Version: 384.90 |
| |
|-------------------------------+----------------------+----------------------+
| 0 Quadro M500M Off | 00000000:06:00.0 Off | N/A |
| N/A 48C P0 N/A / N/A | 943MiB / 2002MiB | 26% Default |
+-------------------------------+----------------------+----------------------+
Preparation for installing of CUDA 9 + SDK
We install a number of build/dev packages which we require later:
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
We notice that the default gcc/g++ version on 17.10 is 7.2.0 (Ubuntu 7.2.0-8ubuntu3)
:
gcc -v
CUDA 9 requires gcc 6. Thus, we install it:
sudo apt install gcc-6
sudo apt install g++-6
Note that the default gcc version is still 7.2
; can be checked by running gcc -v
again.
Installation of CUDA 9 + SDK
From the CUDA Toolkit Archive, select one of the "runfile (local)" installation packages to download a version of CUDA 9, such as
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Make the downloaded file executable and run it using sudo:
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
We install CUDA with the following configurations:
You are attempting to install on an unsupported configuration. Do you wish to continue?
y
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
n
Install the CUDA 9.0 Toolkit?
y
Enter Toolkit Location
[default location]
Do you want to install a symbolic link at /usr/local/cuda?
y
Install the CUDA 9.0 Samples?
y
Enter CUDA Samples Location
[default location]
Set up symlinks for gcc/g++:
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++
Test the CUDA 9 installation using the SDK
Build your favorite CUDA sample and run it:
cd ~/NVIDIA_CUDA-9.0_Samples/5_Simulations/smokeParticles
make
../../bin/x86_64/linux/release/smokeParticles
You may like to set up gcc/g++ symlinks after the cuda install.
edited May 14 at 4:13
ubashu
2,28221736
2,28221736
answered Oct 21 '17 at 19:05
B0rk4
7931712
7931712
1
Been stuck on this issue for a bit. Running 17.10, trying to install CUDA 9. I'm having an issue on step 2: nvidia-smiNVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Ranlspci | grep -i nvidia
says I have a GeForce GTX 760.mokutil --sb-state
shows SecureBoot disabled. Ransudo apt-get purge nvidia*
, ran your install command for 384, and randpkg -S nvidia-smi
nvidia-384: /usr/lib/nvidia-384/bin/nvidia-smi. Any suggestions?
– Clark Kent
Oct 23 '17 at 2:53
4
I had to do eithersudo ln -s /usr/bin/gcc-6 /usr/local/cuda-9.0/bin/gcc sudo ln -s /usr/bin/g++-6 /usr/local/cuda-9.0/bin/g++
orsudo ./cuda_9.0.176_384.81_linux-run --override
as author below recommends to install successfully without compiler conflict
– yauheni_selivonchyk
Nov 3 '17 at 4:22
11
the two commands to add the symbolic links for the gcc 6 compilers have to be done after installing cuda, because /usr/local/cuda does not exist before installing
– Luis Lobo Borobia
Nov 20 '17 at 2:32
1
Helper a lot! The only thing I did in another way - created symlinks after cuda installation at the very end.
– QtRoS
Dec 2 '17 at 16:47
1
Prior to runningcuda_9.0.176_384.81_linux.run
, how did you create the soft links (ln -s
)? Did you manually create the cuda folder?
– mahmood
Mar 17 at 6:09
|
show 11 more comments
1
Been stuck on this issue for a bit. Running 17.10, trying to install CUDA 9. I'm having an issue on step 2: nvidia-smiNVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Ranlspci | grep -i nvidia
says I have a GeForce GTX 760.mokutil --sb-state
shows SecureBoot disabled. Ransudo apt-get purge nvidia*
, ran your install command for 384, and randpkg -S nvidia-smi
nvidia-384: /usr/lib/nvidia-384/bin/nvidia-smi. Any suggestions?
– Clark Kent
Oct 23 '17 at 2:53
4
I had to do eithersudo ln -s /usr/bin/gcc-6 /usr/local/cuda-9.0/bin/gcc sudo ln -s /usr/bin/g++-6 /usr/local/cuda-9.0/bin/g++
orsudo ./cuda_9.0.176_384.81_linux-run --override
as author below recommends to install successfully without compiler conflict
– yauheni_selivonchyk
Nov 3 '17 at 4:22
11
the two commands to add the symbolic links for the gcc 6 compilers have to be done after installing cuda, because /usr/local/cuda does not exist before installing
– Luis Lobo Borobia
Nov 20 '17 at 2:32
1
Helper a lot! The only thing I did in another way - created symlinks after cuda installation at the very end.
– QtRoS
Dec 2 '17 at 16:47
1
Prior to runningcuda_9.0.176_384.81_linux.run
, how did you create the soft links (ln -s
)? Did you manually create the cuda folder?
– mahmood
Mar 17 at 6:09
1
1
Been stuck on this issue for a bit. Running 17.10, trying to install CUDA 9. I'm having an issue on step 2: nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Ran lspci | grep -i nvidia
says I have a GeForce GTX 760. mokutil --sb-state
shows SecureBoot disabled. Ran sudo apt-get purge nvidia*
, ran your install command for 384, and ran dpkg -S nvidia-smi
nvidia-384: /usr/lib/nvidia-384/bin/nvidia-smi. Any suggestions?– Clark Kent
Oct 23 '17 at 2:53
Been stuck on this issue for a bit. Running 17.10, trying to install CUDA 9. I'm having an issue on step 2: nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Ran lspci | grep -i nvidia
says I have a GeForce GTX 760. mokutil --sb-state
shows SecureBoot disabled. Ran sudo apt-get purge nvidia*
, ran your install command for 384, and ran dpkg -S nvidia-smi
nvidia-384: /usr/lib/nvidia-384/bin/nvidia-smi. Any suggestions?– Clark Kent
Oct 23 '17 at 2:53
4
4
I had to do either
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda-9.0/bin/gcc sudo ln -s /usr/bin/g++-6 /usr/local/cuda-9.0/bin/g++
or sudo ./cuda_9.0.176_384.81_linux-run --override
as author below recommends to install successfully without compiler conflict– yauheni_selivonchyk
Nov 3 '17 at 4:22
I had to do either
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda-9.0/bin/gcc sudo ln -s /usr/bin/g++-6 /usr/local/cuda-9.0/bin/g++
or sudo ./cuda_9.0.176_384.81_linux-run --override
as author below recommends to install successfully without compiler conflict– yauheni_selivonchyk
Nov 3 '17 at 4:22
11
11
the two commands to add the symbolic links for the gcc 6 compilers have to be done after installing cuda, because /usr/local/cuda does not exist before installing
– Luis Lobo Borobia
Nov 20 '17 at 2:32
the two commands to add the symbolic links for the gcc 6 compilers have to be done after installing cuda, because /usr/local/cuda does not exist before installing
– Luis Lobo Borobia
Nov 20 '17 at 2:32
1
1
Helper a lot! The only thing I did in another way - created symlinks after cuda installation at the very end.
– QtRoS
Dec 2 '17 at 16:47
Helper a lot! The only thing I did in another way - created symlinks after cuda installation at the very end.
– QtRoS
Dec 2 '17 at 16:47
1
1
Prior to running
cuda_9.0.176_384.81_linux.run
, how did you create the soft links (ln -s
)? Did you manually create the cuda folder?– mahmood
Mar 17 at 6:09
Prior to running
cuda_9.0.176_384.81_linux.run
, how did you create the soft links (ln -s
)? Did you manually create the cuda folder?– mahmood
Mar 17 at 6:09
|
show 11 more comments
up vote
5
down vote
Getting this installed took more time than I would like to admit, and while the above answer is a good template, I had some additional steps required for my fresh install of Ubuntu 17.10:
blacklist nouveau
sudo vim /etc/modprobe.d/blacklist.conf
Add the following:
# this one might not be required for x86 32 bit users.
blacklist amd76x_edac
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
Update initramfs disk
sudo update-initramfs -u
Stop gdm3
sudo /etc/init.d/gdm3 stop
sudo init 3
Get content
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-384 nvidia-384-dev
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
nvidia-smi
Get the package
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Run with --override to override compiler choice
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
After installing the package, I would get errors with nvidia-smi, so I suggest running the command again to verify it works. When I had issues, I would purge nvidia* and re-get it.
nvidia-smi
Some people may need to stoplightdm
instead ofgdm3
, see askubuntu.com/a/65867/422690
– crypdick
Jul 3 at 23:06
add a comment |
up vote
5
down vote
Getting this installed took more time than I would like to admit, and while the above answer is a good template, I had some additional steps required for my fresh install of Ubuntu 17.10:
blacklist nouveau
sudo vim /etc/modprobe.d/blacklist.conf
Add the following:
# this one might not be required for x86 32 bit users.
blacklist amd76x_edac
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
Update initramfs disk
sudo update-initramfs -u
Stop gdm3
sudo /etc/init.d/gdm3 stop
sudo init 3
Get content
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-384 nvidia-384-dev
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
nvidia-smi
Get the package
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Run with --override to override compiler choice
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
After installing the package, I would get errors with nvidia-smi, so I suggest running the command again to verify it works. When I had issues, I would purge nvidia* and re-get it.
nvidia-smi
Some people may need to stoplightdm
instead ofgdm3
, see askubuntu.com/a/65867/422690
– crypdick
Jul 3 at 23:06
add a comment |
up vote
5
down vote
up vote
5
down vote
Getting this installed took more time than I would like to admit, and while the above answer is a good template, I had some additional steps required for my fresh install of Ubuntu 17.10:
blacklist nouveau
sudo vim /etc/modprobe.d/blacklist.conf
Add the following:
# this one might not be required for x86 32 bit users.
blacklist amd76x_edac
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
Update initramfs disk
sudo update-initramfs -u
Stop gdm3
sudo /etc/init.d/gdm3 stop
sudo init 3
Get content
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-384 nvidia-384-dev
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
nvidia-smi
Get the package
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Run with --override to override compiler choice
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
After installing the package, I would get errors with nvidia-smi, so I suggest running the command again to verify it works. When I had issues, I would purge nvidia* and re-get it.
nvidia-smi
Getting this installed took more time than I would like to admit, and while the above answer is a good template, I had some additional steps required for my fresh install of Ubuntu 17.10:
blacklist nouveau
sudo vim /etc/modprobe.d/blacklist.conf
Add the following:
# this one might not be required for x86 32 bit users.
blacklist amd76x_edac
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
Update initramfs disk
sudo update-initramfs -u
Stop gdm3
sudo /etc/init.d/gdm3 stop
sudo init 3
Get content
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-384 nvidia-384-dev
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
nvidia-smi
Get the package
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Run with --override to override compiler choice
chmod +x cuda_9.0.176_384.81_linux-run
sudo ./cuda_9.0.176_384.81_linux-run --override
After installing the package, I would get errors with nvidia-smi, so I suggest running the command again to verify it works. When I had issues, I would purge nvidia* and re-get it.
nvidia-smi
answered Oct 24 '17 at 12:24
Clark Kent
1513
1513
Some people may need to stoplightdm
instead ofgdm3
, see askubuntu.com/a/65867/422690
– crypdick
Jul 3 at 23:06
add a comment |
Some people may need to stoplightdm
instead ofgdm3
, see askubuntu.com/a/65867/422690
– crypdick
Jul 3 at 23:06
Some people may need to stop
lightdm
instead of gdm3
, see askubuntu.com/a/65867/422690– crypdick
Jul 3 at 23:06
Some people may need to stop
lightdm
instead of gdm3
, see askubuntu.com/a/65867/422690– crypdick
Jul 3 at 23:06
add a comment |
up vote
0
down vote
I followed the accepted answer (@ubashu) and everything went well (if not exactly the same, the instructions would lead to the correct path). I would only had the export to Path (as specified also on https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions)
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
After that you can use nvcc -V to check if the install really went well.
New contributor
add a comment |
up vote
0
down vote
I followed the accepted answer (@ubashu) and everything went well (if not exactly the same, the instructions would lead to the correct path). I would only had the export to Path (as specified also on https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions)
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
After that you can use nvcc -V to check if the install really went well.
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
I followed the accepted answer (@ubashu) and everything went well (if not exactly the same, the instructions would lead to the correct path). I would only had the export to Path (as specified also on https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions)
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
After that you can use nvcc -V to check if the install really went well.
New contributor
I followed the accepted answer (@ubashu) and everything went well (if not exactly the same, the instructions would lead to the correct path). I would only had the export to Path (as specified also on https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions)
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
After that you can use nvcc -V to check if the install really went well.
New contributor
New contributor
answered Nov 16 at 22:51
Pedro Esmeriz
1
1
New contributor
New contributor
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f967332%2fhow-can-i-install-cuda-9-on-ubuntu-17-10%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown