This blog is NOT OFFICIAL website of Kali Linux. We just share Tutorials to learn Cybersecurity.

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

Home
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.


author-img
Kali Linux

Comments

31 comments
Post a Comment
  • Unknown photo
    UnknownJuly 11, 2020 at 11:22 AM

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

    Delete Comment
    • Unknown photo
      UnknownJune 24, 2021 at 3:09 PM

      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

      Delete Comment
      • Kali Linux photo
        Kali LinuxJune 26, 2021 at 12:30 PM

        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.

        Delete Comment
        • AnonymousJuly 3, 2023 at 8:15 PM

          thanks this really helped alot.

          Delete Comment
          • AnonymousFebruary 16, 2024 at 9:13 PM

            (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.

            Delete Comment
          • Unknown photo
            UnknownAugust 7, 2020 at 3:50 AM

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

            Delete Comment
            • Unknown photo
              UnknownSeptember 8, 2020 at 9:12 AM

              It didn't work Im on windows 10 unactivated

              Delete Comment
            • Unknown photo
              UnknownOctober 21, 2020 at 12:20 PM

              It is still showing the same.

              Delete Comment
            • Unknown photo
              UnknownNovember 9, 2020 at 8:41 PM

              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!

              Delete Comment
              • Unknown photo
                UnknownDecember 5, 2020 at 1:44 AM

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

                Delete Comment
              • Noob dave photo
                Noob daveJanuary 26, 2021 at 11:34 PM

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

                Delete Comment
                • Unknown photo
                  UnknownMarch 29, 2021 at 10:28 PM

                  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!

                  Delete Comment
                • AnonymousJuly 7, 2021 at 11:09 AM

                  Still facing the problem

                  Delete Comment
                • Shaun W.November 6, 2022 at 1:45 AM

                  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.

                  Delete Comment
                  • Shaun W.November 6, 2022 at 2:06 AM

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

                    Delete Comment
                    • AnonymousNovember 7, 2022 at 5:51 AM

                      Check if you have enough memory to install some applications.

                      Delete Comment
                      • AnonymousNovember 7, 2022 at 5:53 AM

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

                        Delete Comment
                      • AnonymousDecember 6, 2022 at 12:59 PM

                        how to find a terminal?

                        Delete Comment
                        • AnonymousFebruary 9, 2023 at 10:55 AM

                          Still getting the GPG error

                          Delete Comment
                          • AnonymousMarch 22, 2023 at 6:28 PM

                            this was helpful thanks

                            Delete Comment
                            • AnonymousMarch 23, 2023 at 3:28 PM

                              its not working it says

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

                              Delete Comment
                              • AnonymousMarch 24, 2023 at 8:07 AM

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

                                Delete Comment
                              • AnonymousApril 1, 2023 at 3:14 PM

                                i think kali has some issues installing and saving directories

                                Delete Comment
                                • Dieta E Dimagrimento photo
                                  Dieta E DimagrimentoAugust 16, 2023 at 1:28 PM

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

                                  Delete Comment
                                  • AnonymousAugust 19, 2023 at 6:46 AM

                                    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

                                    Delete Comment
                                  google-playkhamsatmostaqltradent