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

-
Facing issues? Have Questions? Post them here! I am happy to answer!
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 Change Android Title Bar Color? - Android
- Notepad++ display files on tab bar as horizontal instead of vertical - NotepadPlusPlus
- Cannot access Windows application shortcuts on Start menu and Taskbar - Windows
- [Mac] Find a file using filename in macOS Terminal - MacOS
- Can we move apps like WhatsApp, Facebook to external MicroSD card - WhatsApp
- How to Configure Mac with PPPoE Ethernet if using DSL or Cable Modem - MacOS
- Fix SharePoint Error - Unable to Display Named Item - SharePoint
- RabbitMQ Queue Listener Java Spring Boot Code Example - Java