# 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:/#

-
Have Questions? Post them here!
More Posts related to Ubuntu,
- Install Oh My Zsh on Ubuntu Docker complete steps
- Installing Home-brew on Ubuntu
- Install Golang (Go) on Ubuntu
- Install specific JRE on Ubuntu using apt
- How to stop/start/restart apache server using command [Ubuntu]
- How to install zsh shell on Ubuntu
- Quick steps to install Nginx on Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- Add new user in Ubuntu Linux using Terminal Command
- Fix Ubuntu /bin/sh: 1: zsh: not found error
- How to install Python on Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to stop MongoDB Server running on Ubuntu
- Install postgres Client using apt-get command
- How to kill service running on a port on Ubuntu Linux
- [fix] openssl No such file or directory error C++
- Fix - sudo: systemctl: command not found
- Access Windows share folder in Ubuntu Device in Network
- Add or remove users from sudo group - Ubuntu
- Quickly install Apache Server on Ubuntu Linux
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
More Posts:
- How to check Command Line Tools Version [Updated for Ventura] - MacOS
- Android Studio setup was canceled - How to resume - Android-Studio
- Gmail Error Bad Request Your client has issued a malformed or illegal request - Google
- Fix Microsoft Teams error We're sorry—we have run into an issue Try again - Teams
- PowerShell ps1 script is not digitally signed, you cannot run this script on the current system - Powershell
- [Solution] IDEA IntelliJ System.out.println function shortcut (sysout alternative for eclipse IDE) - HowTos
- Add new user in Ubuntu Linux using Terminal Command - Ubuntu
- Program 2: Print your name using print() function - 1000+ Python Programs - Python-Programs