Error while installing CUDA 10 Network Unreachable

Hello,

I’ve a fresh Ubuntu 18.04 LTS connected to internet via a proxy with JetPack 4.1.1 with L4T. I’m trying to flash the Jetson Xavier and to install component but it seems that it can’t reach the network to download stuff…

The Jetson is correctly flashed and I chose the “via USB” cable option. I put it in recover mode and start the process but the installation fails when trying to install CUDA 10.

Here is the log when things get messy:

Copying /home/deepwater/Downloads/jetpack_download/cuda-repo-l4t-10-0-local-10.0.117_1.0-1_arm64.deb file to target...
nvidia: 
(Reading database ... 112599 files and directories currently installed.)
Preparing to unpack .../cuda-repo-l4t-10-0-local-10.0.117_1.0-1_arm64.deb ...
Unpacking cuda-repo-l4t-10-0-local-10.0.117 (1.0-1) over (1.0-1) ...
Setting up cuda-repo-l4t-10-0-local-10.0.117 (1.0-1) ...

The public CUDA GPG key does not appear to be installed.
To install the key, run this command:
sudo apt-key add /var/cuda-repo-10-0-local-10.0.117/7fa2af80.pub

OK
Get:1 file:/var/cuda-repo-10-0-local-10.0.117  InRelease
Ign:1 file:/var/cuda-repo-10-0-local-10.0.117  InRelease
Get:2 file:/var/cuda-repo-10-0-local-10.0.117  Release [574 B]
Ign:3 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Ign:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
Ign:5 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
Err:7 http://ports.ubuntu.com/ubuntu-ports bionic Release
  Cannot initiate the connection to 147.210.188.252:3128 (147.210.188.252). - connect (101: Network is unreachable)
Err:8 http://ports.ubuntu.com/ubuntu-ports bionic-updates Release
  Cannot initiate the connection to 147.210.188.252:3128 (147.210.188.252). - connect (101: Network is unreachable)
Err:9 http://ports.ubuntu.com/ubuntu-ports bionic-backports Release
  Cannot initiate the connection to 147.210.188.252:3128 (147.210.188.252). - connect (101: Network is unreachable)
Get:2 file:/var/cuda-repo-10-0-local-10.0.117  Release [574 B]
Err:10 http://ports.ubuntu.com/ubuntu-ports bionic-security Release
  Cannot initiate the connection to 147.210.188.252:3128 (147.210.188.252). - connect (101: Network is unreachable)
Get:11 file:/var/cuda-repo-10-0-local-10.0.117  Release.gpg [819 B]
Get:11 file:/var/cuda-repo-10-0-local-10.0.117  Release.gpg [819 B]
Reading package lists... Done   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gnupg is already the newest version (2.2.4-1ubuntu1.1).
gnupg set to manually installed.
The following packages were automatically installed and are no longer required:
  libdbusmenu-gtk4 libdbusmenu-qt5-2 libgsettings-qt1 liblockfile-bin
  liblockfile1 libqt5sql5 libqt5sql5-sqlite lockfile-progs
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Connection to 192.168.55.1 closed.
dpkg-query: package 'cuda-toolkit-10-0' is not installed and no information is available
dpkg-query: package 'libfreeimage-dev' is not installed and no information is available
dpkg-query: package 'libopenmpi-dev' is not installed and no information is available
dpkg-query: package 'openmpi-bin' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
1
Error: CUDA cannot be installed on device. This may be caused by other apt-get command running on device when installing CUDA. Please use apt-get command in a terminal to make sure following packages are installed correctly on device before continuing:
cuda-toolkit-10-0 libgomp1 libfreeimage-dev libopenmpi-dev openmpi-bin
After these packages are installed on device, press Enter key to continue

As I’m behind a proxy so I declared it in ~.bashrc
and in apt.conf in /etc/apt on the host computer.

First to be sure, do I need to connect the Jetson to the internet via Gigabit Ethernet?

Note that I tried many things found around the web. ‘$ apt-get update’
does not work properly, I got the same issue as stated above. I tried to create the same ‘apt.conf’ file on the Jetson but it does not seems to work.

Thank you in advance for your help!

I don’t know about the proxy side, but basically JetPack is just a front end to flash software and to install optional packages. The flash and package install are separate steps where the flash is done over USB in recovery mode (and if you don’t flash you don’t need USB, nor would you need recovery mode), and then the Xavier reboots and package additions are done via ssh over wired ethernet between the host and the Jetson (there is actually an option to use the USB connection to make the host believe the Jetson is a wired ethernet device, but although it is over USB it really is still wired ethernet if that option is used).

In all cases the host PC must be able to download through the internet, and if download or install of packages fails, then odds are high it is because JetPack expected some port or address to be accessible and was not. I’m not sure what all of the ports are which JetPack uses when talking to the outside world, but likely your proxy is not set up correctly.

Thank you very much for you explanation, a last blurry point remains: I disconnected the Ethernet cable from the Jetson and I’m still able to reach it via SSH.

From what you said I guess that the SSH connection is active through the USB, but what about the internet data flow?

Does my host download the data from internet and then sent it to the Jetson through local network and Ethernet?

Thank you.

The Xavier was set up so that USB can be seen as a network adapter at the host PC. This is not a “real” ethernet adapter, but the host sees it as this. This is the same as a direct connection over wired ethernet between host PC and Xavier. During the install choices are given about how to connect…one choice is via a router, a second choice is over wired ethernet with the host PC acting as router, and the newest option is over USB with USB pretending to be ethernet (the “pretending” part is not given in the description).

If you can ssh to Xavier from PC, then this part is functioning correctly, and the only thing left is how the PC talks to the internet. The answer is yes, the host downloads from the internet and transfers to the Jetson over local ethernet (even if it is USB pretending to be ethernet).

Not sure it is exactly the same…I faced problems using USB bridge, where the connection was regurlarly renewed each 30s.

Thanks you all, I solved the problem!

As said by linuxdev and from what I learnt, the Jetson Xavier must be connected to internet through its Ethernet interface. The host PC sends SSH commands through the USB connection OR through the local network if this option is chosen. Then, Jetson download stuff via its own internet access.

In my specific case the Jetson was connected to Ethernet but the connection were not active as I had to declare its MAC address to my lab IT. Then I was able to set proxy and to access internet :)

I think the easiest thing to do is to connect the Jetson Xavier to keyword, mouse and display right after flashing it so you can solve problems locally on it (it’s much easier with an user interface!). Then, you can check if SSH connection to the host and internet connection is available. When it is all set properly go back to JetPack and install packages (just unselect “flash OS”, and enter Jetson IP address, username and password when required).

Hope that this will help!