[Fix] Ubuntu E: Unable to locate package sudo error


Error:
# apt install sudo

Reading package lists... Done
Building dependency tree       
Reading state information... Done

E: Unable to locate package sudo

You might get unable to locate package error when executing the apt package installer command on the Ubuntu command line if either you are looking for a package that does not exists or your apt is not up to date.

Solution/Fix

All you need to do is just run the command: apt update, this will get details of all available packages on your system and you should be able to install the package you were looking for.

root@8d376ec5427e:/# apt update

Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
...                                                                                                            
...                                                                                                              
Get:18 http://ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [1066 kB]                                                                                                                   
Fetched 17.6 MB in 12s (1506 kB/s)                                                                                                                                                                         
Reading package lists... Done
Building dependency tree       
Reading state information... Done
15 packages can be upgraded. Run 'apt list --upgradable' to see them.

root@8d376ec5427e:/# 
Fix E- Unable to locate package in Ubuntu
-


Have Questions? Post them here!

Top Hashtags:

Advertisements

Advertisements




Advertisements