Kali Linux needs a dedicated source to download and install the packages we ask. By default, Kali Linux doesn't come with the necessary source links. We have to manually put the list of sources from where we want to install our packages. If there is no source list on the Linux system it will result in 'unable to locate package' problem. But you can solve the problem by going through the processes explained below. These are the simplest steps to solve this problem.
1. Go to your Linux computer File system and navigate to etc>apt folder.
2. Right-click on the 'sources.list' text file and open it with any text editor.
3. Delete if there is anything already on the text file.
4. Copy and paste the following lines to the text file.
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
deb http://http.kali.org/kali kali-rolling main non-free contrib
5. Save the text file and close it.
6. Update the system using the 'apt-get update' command.
These repositories are verified by Kali Linux. If you ask for a package outside these repositories, you have to add a source URL to the sources list. But these repositories will solve 99% of your problems you were searching for a solution.