E: Unable to locate package

I have Jetson Nano which is not a dev kit but a third-party carrier board with Jetson Nano as an SoM. After BSP(Provided by the company ) boots, when I try to install the nano editor I get the following error :

`t-tech@ttech-desktop:~$ sudo apt-get -y install nano

[sudo] password for t-tech:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
nano is already the newest version (6.2-1).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
`
Then I tried to install Python3 but ended with the same thing

`ttech@ttech-desktop:~$ sudo apt-get install -y python3-pip

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package python3-pip
`
Then I found repository mentions in: Unable to Locate Package - Basically every package i try to install are already enabled.

Lastly, from here : 6 Ways to Fix "E: Unable to Locate Package" Error on Ubuntu the 5th point I come to about

hwe-support-status --verbose

and this command results in

ttech@ttech-desktop:~$ hwe-support-status --verbose You are not running a system with a Hardware Enablement Stack. Your system is supported until April 2023.

If the Ubuntu version is not supported and has expired, you will receive the error “E: Unable to Locate Package” when installing new packages.

Is there any way to upgrade the version support? Please help me. I appreciate any help you can provide.
@linuxdev Do you know the solution? I appreciate any help you can provide.

It might be a case of the Nano running Ubuntu 18.04 being too old. You might even be running Ubuntu 16.04. What L4T release is this? See “head -n 1 /etc/nv_tegra_release”. If it is R32.x, then it is Ubuntu 18.04, if it is R28.x, then it is Ubuntu 16.04.

Also, what do you see from:
apt search '(python3|python)\-pip'
(I’m using regular expressions)

At some point it might be “python” is “python2”, but not labelled, or the inverse, it might be “python3”, but not labelled…then as releases progress, the deprecated version gets the “numbered” name. Not sure, I’m not really a Python guy.

Your nano editor is already there at least. The command shows that apt is functioning and that there is internet access.

EDIT: I just thought the search command might be better as:
apt search '(python2|python3|python)\-pip'
(this could be a better regex, but the above will work)

@linuxdev Thanks for your response.

The release as per this head -n 1 /etc/nv_tegra_release
ttech@ttech-desktop:~$ head -n 1 /etc/nv_tegra_release

R32 (release), REVISION: 7.2, GCID: 30192233, BOARD: t210ref, EABI: aarch64, DATE: Wed Apr 20 21:34:48 UTC 2022

Also apt search '(python3|python)\-pip' result in

ttech@ttech-desktop:~$ apt search '(python2|python3|python)\-pip' Sorting... Done Full Text Search... Done

And sudo apt search '(python2|python3|python)\-pip' result in

ttech@ttech-desktop:~$ sudo apt search '(python2|python3|python)\-pip' Sorting... Done Full Text Search... Done

Your L4T release version is the most recent for the Nano (not for Orin Nano, a different Jetson), so you are running Ubuntu 18.04. The result either did not paste into the forum thread, or the search did not accept the regular expressions. You could manually run each of these:

apt search python-pip
apt search python2-pip
apt search python3-pip

ttech@ttech-desktop:~$ apt search python-pip
Sorting… Done
Full Text Search… Done
ttech@ttech-desktop:~$ apt search python2-pip
Sorting… Done
Full Text Search… Done
ttech@ttech-desktop:~$ apt search python3-pip
Sorting… Done
Full Text Search… Done
ttech@ttech-desktop:~$

That is quite odd. If the network is available, and if the setup is from the default of any Ubuntu (including Jetsons), then there should have been a listing of packages. Can you attach a copy of this file to the forum?
/etc/apt/sources.list

Also, what happens if you run these commands, which only update:

sudo apt update
sudo apt-get upgrade

Can your Jetson ping outside networks, e.g., can you “ping google.com” or “ping nvidia.com”?

`ttech@ttech-desktop:~$ sudo apt update
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/cuda-repo-l4t-10-2-local Release [564 B]
Get:2 file:/var/cuda-repo-l4t-10-2-local Release [564 B]
Get:3 https://repo.download.nvidia.com/jetson/common r32.7 InRelease [2,555 B]
Get:4 https://repo.download.nvidia.com/jetson/t210 r32.7 InRelease [2,553 B]
Hit:5 Index of /ubuntu-ports bionic InRelease
Hit:7 Index of /ubuntu-ports bionic-updates InRelease
Hit:8 Index of /ubuntu-ports bionic-backports InRelease
Hit:9 Index of /ubuntu-ports bionic-security InRelease
Fetched 5,108 B in 2s (3,054 B/s)

** (appstreamcli:7844): WARNING **: 20:23:09.924: No origin found for file ports.ubuntu.com_ubuntu-ports_dists_bionic_main_dep11_Components-arm64.yml.gz

** (appstreamcli:7844): WARNING **: 20:23:09.924: No origin found for file ports.ubuntu.com_ubuntu-ports_dists_bionic_universe_dep11_Components-arm64.yml.gz

** (appstreamcli:7844): WARNING **: 20:23:09.925: No origin found for file ports.ubuntu.com_ubuntu-ports_dists_bionic_multiverse_dep11_Components-arm64.yml.gz

** (appstreamcli:7844): WARNING **: 20:23:09.925: No origin found for file ports.ubuntu.com_ubuntu-ports_dists_bionic-updates_main_dep11_Components-arm64.yml.gz

** (appstreamcli:7844): WARNING **: 20:23:09.925: No origin found for file ports.ubuntu.com_ubuntu-ports_dists_bionic-updates_universe_dep11_Components-arm64.yml.gz

** (appstreamcli:7844): WARNING **: 20:23:09.925: No origin found for file ports.ubuntu.com_ubuntu-ports_dists_bionic-backports_main_dep11_Components-arm64.yml.gz

** (appstreamcli:7844): WARNING **: 20:23:09.925: No origin found for file ports.ubuntu.com_ubuntu-ports_dists_bionic-backports_universe_dep11_Components-arm64.yml.gz

** (appstreamcli:7844): WARNING **: 20:23:09.925: No origin found for file ports.ubuntu.com_ubuntu-ports_dists_bionic-security_main_dep11_Components-arm64.yml.gz

** (appstreamcli:7844): WARNING **: 20:23:09.925: No origin found for file ports.ubuntu.com_ubuntu-ports_dists_bionic-security_universe_dep11_Components-arm64.yml.gz
Reading package lists… Done
Building dependency tree
Reading state information… Done
All packages are up to date.`

ttech@ttech-desktop:~$ sudo apt upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

ttech@ttech-desktop:~$ ping google.com
PING google.com (142.251.42.14) 56(84) bytes of data.
64 bytes from bom12s19-in-f14.1e100.net (142.251.42.14): icmp_seq=1 ttl=118 time=5.56 ms
64 bytes from bom12s19-in-f14.1e100.net (142.251.42.14): icmp_seq=2 ttl=118 time=5.32 ms
64 bytes from bom12s19-in-f14.1e100.net (142.251.42.14): icmp_seq=3 ttl=118 time=7.03 ms
^C
google.com ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 5.328/5.974/7.032/0.754 ms
ttech@ttech-desktop:~$ ping nvidia.com
PING nvidia.com (34.194.97.138) 56(84) bytes of data.
^C
nvidia.com ping statistics —
6 packets transmitted, 0 received, 100% packet loss, time 5105ms

I think I am not able to ping nvidia.com

It looks like it should work (the sources.list), but something is going wrong. Try to clean cache, and then update again:

sudo apt-get clean
sudo apt update
sudo apt-get upgrade

Does first cleaning cache help? Most systems are configured to auto check after GUI login, and I don’t know what the configuration is, so it is possible that if you do the above right after login (if via GUI) that it have issues locking (I don’t think that is related though).

Not being able to ping nvidia.com is actually expected, but it did demonstrate that DNS is working, and that the server your DNS pointed at is 34.194.97.138 (ping uses ICMP and not all hops or servers support this).

Basically, you have a corrupt cache. If the command to clear cache fails, then go here and delete all of the cache files, but only do this if the earlier “clean” operation does not do the job:

sudo -s
cd /var/lib/apt/lists
# Be 100% certain you are at the above location and nowhere else.
rm *

# Now normal update:
cd
apt update
apt-get upgrade
exit

Then perform the python searches from above again and see if anything shows up.

1 Like

The sudo apt-get clean does not work, so I proceed ahead with rm * It shows

rm: cannot remove 'auxfiles': Is a directory
rm: cannot remove 'partial': Is a directory

Shall I proceed ahead?

Edit: @linuxdev Thanks it works. Thank you for being so helpful.

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