ubuntu unable to locate package code example

Example 1: E: Unable to locate package software-properties-common 2020

# that can be due to offline installation of the distro

# open the sources.list file using the following command
sudo nano /etc/apt/sources.list

# check if the file contains the following lines
deb http://http.kali.org/kali kali-rolling main non-free contrib 
deb-src http://http.kali.org/kali kali-rolling main non-free contrib

# if it doesn't have these 2 lines, just add 'em at the beginning of the file and 
# press ctrl+o save changes then ctrl+x to exit

# don't forget to type the following command in the terminal after you finish
sudo apt update

Example 2: E Unable to locate package sl

sudo apt update

Example 3: unable to locate package ubuntu

sudo apt install

Example 4: unable to locate package dos2unix

deb http://al.archive.ubuntu.com/ubuntu/ precise universe

Example 5: e unable to locate package pyrit

sudo su
cd /etc/apt/
ls
nano source.list

You should be able to use any of the listed mirrors by adding a line to your /etc/apt/sources.list
like this : deb http://cz.archive.ubuntu.com/ubuntu bionic main universe
Replacing cz.archive.ubuntu.com/ubuntu with the mirror in question.

./source.list
sudo apt update 
sudo apt-get install pyrit

Tags:

Misc Example