Unable to install CUDA on jetson nano help?

Hello, I have been trying for almost two days now to install CUDA on my jetson nano, but everything I try never works.

I tried this tutorial on stereo labs https://www.stereolabs.com/blog/getting-started-with-jetson-nano/, but no luck.

I tried to follow the NVIDIA installation guide of installing CUDA. I went through the prerequisites first and when I get to

sudo apt-get install linux-headers-$(uname -r)

I get this output

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.9.140-tegra
E: Couldn't find any package by glob 'linux-headers-4.9.140-tegra'
E: Couldn't find any package by regex 'linux-headers-4.9.140-tegra'

I tried to get the runtime file for ubuntu x86_64 off the NVIDIA website and just running it as instruction using

sudo sh cuda_10.1.105_418.39_linux.run

, but I still get an error of:

cuda_10.1.105_418.39_linux.run: 1: eval: ./cuda-installer: Exec format error

Hi, have you used the pre-built SD card image and followed this Getting Started with Jetson Nano guide from NVIDIA? https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit

Note that CUDA, cuDNN, TensorRT, ect. are not installed on Jetson the way they are on desktop, and the ARM aarch64 installers for these are downloaded individually from the website. They come on the pre-built SD card image or with JetPack.

Yes I installed the provided SD image for the Jetson nano from that link. I used etcher to flash the image on my SD card.

So they are already installed? When I try to use nvcc on terminal nothing happens?

Are there other steps I need to follow before I can use CUDA?

Can you find nvcc in /usr/local/cuda/bin ?

I have the same problem with Exec format error. I flashed the OS with JetPack on my AGX Xavier but there isn’t any folder called “cuda” in /usr/local/

CUDA-10 seems to be installed when the SDCard is flashed following the getting started guide. What’s missing is adding the respective folders to $PATH and $LD_LIBRARY_PATH. Just add this and you should be good to go

Hi PL11, JetPack is not installed to Xavier by etching the SD card image like it can be on Nano, Xavier uses the NVIDIA SDK Manager, which will install CUDA Toolkit over the network after flashing the device. If installing CUDA didn’t work, the SDK Manager probably had a network problem connecting to your Xavier from your host PC. First boot your Xavier and make sure you can ping it from your host PC, then try re-running SDK Manager and installing CUDA again. If that doesn’t work, recommend you create a post in the Jetson Xavier forum about it.

Hello, I figured it out! I went into the cuda path that dusty_nv gave me and I set the paths for cuda and for the cuda library as cfr told me.

Here are the commands I used. I am not sure if this permanently sets the paths as I do not have a lot of experience with UBUNTU

export PATH=${PATH}:/usr/local/cuda/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64

Thank you both.

Edit: I will mark this as solved tomorrow.

2 Likes

I think the real problem is that the microSD image expects original account to be setup as nvidia:nvidia. When prompted for account setup, if you enter nvidia:nvida (just like the TK1/TX1/TX2 were setup), I don’t think you’ll see these PATH problems. At least I haven’t.

This does not solve my problem (equal to yours) since those bin directories do not exist

You can stick those lines at the end of your ~/.profile or ~/.bashrc, reboot, and that will work persistently. You shouldn’t need the “export” on PATH since it’s already defined. I prefer ~/.profile personally since I like my .bashrc to be portable, but it’s up to you.

So at the end of either of those files, add:

PATH="/usr/local/cuda/bin:$PATH"

If you want it to be for every new user you can add the line to /etc/skel/.profile (or .bashrc)

The library path shouldn’t be necessary since that is set up in:

/etc/ld.so.conf.d/cuda-10-2.conf  (or whatever is the current version)

You can add more library paths to that folder (/etc/ld.so.conf.d/) in the format and permissions of the other .conf files and run sudo ldconfig if you need to add more (eg. deepstream 5.0).

Hi,

I was unable to install CUDA 10.0 on NVIDIA Jetson nano. Continuously, I am receiving errors, can anyone please guide me how to install CUDA,Tensorflow and Keras.