Error when running sudo apt-get update -y on Putty

I installed a wifi card on the jetson nano, but I didn’t manually log into my personal wifi (which maybe is needed?).

This is what the error looks like:

kevinlee@kevinlee-desktop:~$ sudo apt-get update -y
Get:1 file:/var/cuda-repo-l4t-10-2-local InRelease
Ign:1 file:/var/cuda-repo-l4t-10-2-local InRelease
Get:2 file:/var/visionworks-repo InRelease
Ign:2 file:/var/visionworks-repo InRelease
Get:3 file:/var/visionworks-sfm-repo InRelease
Ign:3 file:/var/visionworks-sfm-repo InRelease
Get:4 file:/var/visionworks-tracking-repo InRelease
Ign:4 file:/var/visionworks-tracking-repo InRelease
Get:5 file:/var/cuda-repo-l4t-10-2-local Release [564 B]
Get:6 file:/var/visionworks-repo Release [2,001 B]
Get:7 file:/var/visionworks-sfm-repo Release [2,005 B]
Get:8 file:/var/visionworks-tracking-repo Release [2,010 B]
Get:5 file:/var/cuda-repo-l4t-10-2-local Release [564 B]
Get:6 file:/var/visionworks-repo Release [2,001 B]
Get:7 file:/var/visionworks-sfm-repo Release [2,005 B]
Get:8 file:/var/visionworks-tracking-repo Release [2,010 B]
Err:13 Index of /ubuntu-ports bionic InRelease
Could not resolve ‘ports.ubuntu.com
Err:14 https://repo.download.nvidia.com/jetson/common r32.6 InRelease
Could not resolve ‘repo.download.nvidia.com
Err:15 Index of /ubuntu-ports bionic-updates InRelease
Could not resolve ‘ports.ubuntu.com
Err:16 https://repo.download.nvidia.com/jetson/t210 r32.6 InRelease
Could not resolve ‘repo.download.nvidia.com
Err:17 Index of /ubuntu-ports bionic-backports InRelease
Could not resolve ‘ports.ubuntu.com
Err:18 Index of /ubuntu-ports bionic-security InRelease
Could not resolve ‘ports.ubuntu.com
Reading package lists… Done
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic/InRelease Could not resolve ‘ports.ubuntu.com
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/InRelease Could not resolve ‘ports.ubuntu.com
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/InRelease Could not resolve ‘ports.ubuntu.com
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/InRelease Could not resolve ‘ports.ubuntu.com
W: Failed to fetch https://repo.download.nvidia.com/jetson/common/dists/r32.6/InRelease Could not resolve ‘repo.download.nvidia.com
W: Failed to fetch https://repo.download.nvidia.com/jetson/t210/dists/r32.6/InRelease Could not resolve ‘repo.download.nvidia.com
W: Some index files failed to download. They have been ignored, or old ones used instead.

DNS problem? Is your wifi cable to access external Internet?

I’m not too knowledgeable on this topic, so I’m not too sure what you meant in your message. To provide more information, I am using this wifi card Amazon.ca.

I noticed in this article Getting started with Jetson Nano and Donkey car aka Autonomous Car | by Fei Cheung | Medium, they faced a similar issue and used the command: echo “blacklist rtl8192cu” | sudo tee -a /etc/modprobe.d/blacklist.conf.

Is this something I should try or do you have any other suggestions for me to try?

This is not about doing something to your wifi card.

My question is just like “are you able to access to external website” on your jetson?

Those external website is like google.com or that http://ports.ubuntu.com/

An alternate way of asking the same thing is to see if ping and DNS work. What do you see from:

host nvidia.com

The answer might differ depending on where you are in the world, but for me I see:

nvidia.com has address 216.228.121.209
nvidia.com mail is handled by 10 nvidia-com.mail.protection.outlook.com.

Using the IP address above, you might see if you can ping that address (assuming DNS worked and gave you such an address):
ping 216.228.121.209

If the first one fails, then your router or gateway is failing in such a way that DNS is not answering. This is the name-to-address service. If the ping of an address outside of your Jetson fails, then perhaps networking as a whole is failing to the outside world.

If you can provide the above information, then this will to some extent answer questions about the extent of what is or is not working in networking.

Either way, if you want to debug this from a networking point of view (ignore the WiFi card for now), then include the output from these commands:

ifconfig
iwconfig
route
kevinlee@kevinlee-desktop:~$ host nvidia.com
;; connection timed out; no servers could be reached
kevinlee@kevinlee-desktop:~$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:69:52:53:52  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 48:b0:2d:51:fc:a0  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 150  base 0xe000

l4tbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.55.1  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::4c7f:93ff:fe16:6495  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        ether 4e:7f:93:16:64:95  txqueuelen 1000  (Ethernet)
        RX packets 2379  bytes 690092 (690.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 305  bytes 20175 (20.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 594  bytes 43386 (43.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 594  bytes 43386 (43.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::4c7f:93ff:fe16:6495  prefixlen 64  scopeid 0x20<link>
        ether 4e:7f:93:16:64:95  txqueuelen 1000  (Ethernet)
        RX packets 2406  bytes 693089 (693.0 KB)
        RX errors 0  dropped 4  overruns 0  frame 0
        TX packets 330  bytes 41809 (41.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 4e:7f:93:16:64:97  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 70:cf:49:9b:d2:05  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
kevinlee@kevinlee-desktop:~$ iwconfig
dummy0    no wireless extensions.

l4tbr0    no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

usb0      no wireless extensions.

lo        no wireless extensions.

docker0   no wireless extensions.

rndis0    no wireless extensions.

kevinlee@kevinlee-desktop:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

Here’s what my device manager looks like as well, in case it helps.

Are you sure you really understand why @linuxdev wants you to check that?

Do you know that “apt-get update” requires to access to Internet?

I don’t think I ever claimed to really understand why @linuxdev wanted me to check it, but I figured sharing the output of all the commands would give @linuxdev a good idea why my networking is failing.

It seems that my jetson nano does not have access to the internet, but I’m not quite sure how to fix that since it’s outside of the scope of the “Getting started with the jetson nano” tutorial.

Ok… maybe you can google search the meaning of each command and understand what are they doing for. It will help you in lots of aspect since it sounds like you are new to Linux.

Currently, your wifi does not have a IP assigned. So again, I have another question, are you sure your wifi is connecting to something that is able to access the external Internet (gateway)? You can use the ubuntu GUI on the desktop to control your wifi connection.

Okay, so I think I may have solved the issue. I booted the nano with display and logged into the wifi. Then I ran the update command and all files were fetched. Just wondering, how would I have done this in headless mode?

Just to give you a general idea of what is going on, it looks like you are using the USB cable for the network connection. The Jetson would use IP address 192.168.55.1, and the host PC (on that cable) would be address 192.168.55.100. For the case of PC and Jetson talking to each other by naming those numeric IP addresses it should work.

The problem though is that the Jetson has no default route. A “router” has the ability to forward and connect different IP addresses as a kind of adapter when you need to talk to some other computer which is not locally available. Basically, if it were set up correctly, then the “route” command would show you a default gateway. Adding or removing WiFi does trigger having this set up, or not set up.

I have not set up WiFi to run in headless mode, but if the USB cable is connected, then if you set a default gateway to be the host PC, and if that PC is told to forward anything requesting the outside world, then the Jetson would use the PC as it is a gateway, and the PC would pretend to be a router. The PC’s access to the internet would then be available to the Jetson as if the Jetson is talking to a router with a default route.

The “host” command basically tests if named addresses can be converted to numeric addresses (this is “DNS” service). For it to work the Jetson would need access to the outside world. Without this you can only use the numeric (“dotted-decimal”) IP address format. DNS servers are usually part of your ISP. No gateway implies no DNS.

You have two choices:

  1. Set your PC up to forward for the Jetson, and tell the Jetson that the IP address of the host PC is the default gateway (which means that if you request any address other than “192.168.55.1” or “192.168.55.100”, then the PC would be consulted and asked to reroute to the outside world);
  2. Set up the WiFi (which uses the WiFi router’s forwarding/DNS/gateway abilities) to run without the GUI running (which is what headless mode does).

Sorry, I couldn’t give you the steps for that (partly because I don’t use headless, I also don’t use WiFi, and I use wired ethernet directly to a router rather than the USB to the PC…when I do work on the PC I run Linux which would be quite a bit different in forwarding setup compared to Linux).

No worries, thanks for the help! Your explanation was really easy to follow and saved me hours of searching :)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.