[Solved] E: Unable to locate package in Kali Linux

[Solved] E: Unable to locate package in Kali Linux

Like other Linux distribution Kali Linux also needs a dedicated source to download and install the packages we need. By default, Kali Linux doesn’t come with the necessary source links.

We need to manually put the list of sources from where we want to install our required packages. If there is no sources list or bad sources list on the Linux system it will result in ‘E: unable to locate package‘ error.

E: unable to locate package

This problem may comes due to bad internet connection. If the internet connection is not the problem then it might because for the wrong repository. We will solve this problem by going through the processes explained in this article.

First we need to go to our Kali Linux’s computer File system and navigate to etc/apt folder.

Right-click on the ‘sources.list‘ text file and open it with any text editor.

editing sources.list
editing sources.list on mousepad

Delete if there is anything already wrote on the text file. Then copy and paste following lines there.

deb http://http.kali.org/kali kali-rolling main non-free contrib

Then save and close it.

kali repository sources.list

There is another way to do it more easily. We can use a single command to do all these works. We just need to open a terminal and run the following command:

echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list

This command may ask the super user password (SuDo password) of the Kali Linux machine and fix the repository.

Now we need to update the system by using following command:

sudo apt-get update

Now it will start update and after update our problem is fixed.

So this is the most simple way to fix unable to locate package in Kali Linux.

Fix slow update/upgrade or install in Kali Linux



It will work for everyone if not then please comment down below. For more tutorial on Kali Linux visit our blog regularly and follow us on Twitter an Medium for quick update.

KP AKA Koushik Pal is a Security researcher and specialist focused on educating about Linux for cybersecurity and URL‑masking vulnerabilities. Creator of MaskPhish, a well‑known open‑source bash-based URL‑masking tool. Linux enthusiasts Active speaker, trainer, and advocate for secure web practices.

31 comments

comments user
Unknown

thank you so much to solve my problem ….it really helps

comments user
Unknown

You are a life saver. Thanks it worked so well.

comments user
Unknown

It didn't work Im on windows 10 unactivated

comments user
Unknown

It is still showing the same.

comments user
Kali Linux

Not working? can you please explain the problem?

comments user
Kali Linux

try command
sudo apt-get install php openssh git wget -y

comments user
Unknown

I have tried everything possible on the internet to solve out this problem but I still could not even come to close to solving it , can somebody please help!

comments user
Unknown

i can´t save the .text file, permission denied?! why?

comments user
Kali Linux

You need to use sudo before the command. Thanks

comments user
Noob dave

I found a solution was to put apt in front of the install command.
Sudo apt install kali-linux-large
For example

comments user
Unknown

I am having trouble still with getting the Volatility package. "E: Unable to locate package Volatility" I have tried the sources.list but not sure what else to do. Any help would be greatly appreciated!

comments user
Kali Linux

isn't Volatility comes pre-installed with Kali Linux? Anyways Here you can read the official documentations of Volatility Installation.

comments user
Unknown

its not working it says

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package zoom_i386.deb

i am workin 3 day on this problem plz resolve this

comments user
Kali Linux

From the name of the package (zoom_i386.deb) we can guess some thing. It is the original 32 bit x86 architecture. Most desktop systems today are 64 bit systems and use the amd64 architecture. So please check your system architecture and try to install the correct installer for zoom.

Thanks.

comments user
Anonymous

Still facing the problem

comments user
Kali Linux

Can you describe the issue, then may be we can try to solve this.

comments user
Anonymous

Activate windows

comments user
Shaun W.

my Kali 2020.4 sources.list is fine. after sudo apt-get update then sudo apt install xllvnc I get E: Unable to locate package xllvnc.
I have 6 computers with 2020.4 installed the same way on same x64 system. Sometimes it installs sometimes it does not. Sometimes I wait a few days and it will install suddenly. I have a very good internet connection.
When it installs the sudo apt-get update displays dozens of lines. when it fails I get reading package lists,Building…,Reading. Just 3 lines.

comments user
Shaun W.

One more thing – apt search xllvnc returns xllvnc/kali-rolling 0.9.16-8+b1 amd64

comments user
Anonymous

Check if you have enough memory to install some applications.

comments user
Anonymous

Check this no need to search for x11 packages https://www.kali.org/docs/general-use/novnc-kali-in-browser/

comments user
Anonymous

how to find a terminal?

comments user
Anonymous

Still getting the GPG error

comments user
Anonymous

this was helpful thanks

comments user
Anonymous

its not working it says

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package oletools

comments user
Anonymous

Use command sudo -H pip install -U oletools. Hope this will work. Thanks.

comments user
Anonymous

i think kali has some issues installing and saving directories

comments user
Anonymous

thanks this really helped alot.

comments user
Dieta E Dimagrimento

I can't install Google Chrome. I am giving the command following the command shown by you but the same problem is appearing.

comments user
Anonymous

Hi we have a separate article to install Google Chrome and Chromium. Please follow this link: https://www.kalilinux.in/2021/02/how-to-install-google-chrome-chromium.html

comments user
Anonymous

(yugant-kali㉿kali)-[~]
└─$ echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list
deb http://http.kali.org/kali kali-rolling main non-free contrib

┌──(yugant-kali㉿kali)-[~]
└─$ sudo apt install code-oss-y
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package code-oss-y

——————————————————————————
Did all the necessary things but not working.

Post Comment