Unable to locate package kali linux all

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

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.

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:

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.

Источник

Can’t install anything on Kali Linux (Unable to locate package..) [closed]

What package are you trying to install? Are you sure it’s in the repositories? You’ve done an apt update or apt-get update ?

You can’t just install any package in existence, only the ones in your repos are available. And what was the output from an update, did it actually update anything or gave errors? This command should list all packages, available and «[installed]»: apt search «.*»

Читайте также:  Was install root linux

3 Answers 3

Solved Unable to Locate Package Issue

  1. Enter the command: leafpad /etc/apt/sources.list
  2. Remove everything within that sources.list file
  3. Google for «Kali Linux Repository» or use this link: Kali Linux Repository
  4. Scroll down and look for «The kali-rolling repository»
  5. Copy everything within that kali-rolling and paste on sources.list file
  6. Save the sources.list file
  7. Run the command: apt-get update
  8. Now install ur package(e.g:apt-get install tor)

You may have an issue with your /etc/apt/sources.list file which is where the apt command looks for the installation of new packages. According to the Kali official docs:

The single most common causes of a broken Kali Linux installation are following unofficial advice, and particularly arbitrarily populating the system’s sources.list file with unofficial repositories.

You can try making a backup of your current sources.list file then creating a new one with the «default» source entry. You’ll need to run these as root/with sudo:

# cp /etc/apt/sources.list /etc/apt/sources.list.backup 
# echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list 

Now try running sudo apt update . If that completes successfully, try installing your package again. See the link above for additional information that may be useful depending on your exact Kali release.

Источник

How to solve Kali Linux apt-get install: E: Unable to locate package checkinstall

Carlos Delgado

Learn how to solve the installation error of Check Install in Kali Linux.

In some of our tutorials, we like to build packages from source as this helps you to get more experience as a developer, knowing the why of the things etc. Unfortunately, some reports mentioned the exception of the failure of the installation of the checkinstall package with the following command:

sudo apt-get install checkinstall

The error triggered in the terminal (Unable to locate package), says basically that the package cannot be found in the repositories list of apt that you have currently in your Kali Linux. In this short article, we will explain you how to install the checkinstall package adding some missing entries to the sources of apt in Kali Linux.

1. Edit the apt sources.list file with some editor

As part of its operation, Apt uses a file that lists the ‘sources’ from which packages can be obtained. This file is /etc/apt/sources.list and you need to edit it with some either CLI editor o text editor, we will use the nano editor in this case:

sudo nano /etc/apt/sources.list 

We will append some text at the end of this file in the next step.

2. Append old repositories information

Now that you know the file that you need to edit, proceed to append the following entries at the end of the file:

deb http://http.kali.org/kali kali-rolling main contrib non-free # For source package access, uncomment the following line # deb-src http://http.kali.org/kali kali-rolling main contrib non-free deb http://http.kali.org/kali sana main non-free contrib deb http://security.kali.org/kali-security sana/updates main contrib non-free # For source package access, uncomment the following line # deb-src http://http.kali.org/kali sana main non-free contrib # deb-src http://security.kali.org/kali-security sana/updates main contrib non-free deb http://old.kali.org/kali moto main non-free contrib # For source package access, uncomment the following line # deb-src http://old.kali.org/kali moto main non-free contrib

This basically adds the old kali repositories to apt, so we will be able to install the checkinstall tool with the regular command. The first word on each line, deb or deb-src, indicates the type of archive. Deb indicates that the archive contains binary packages (deb), the pre-compiled packages that we normally use. Deb-src indicates source packages, which are the original program sources plus the Debian control file (.dsc) and the diff.gz containing the changes needed for packaging the program.

Читайте также:  Linux присвоить переменной результат выполнения команды

Save changes to the file and proceed to update the repositories list with:

3. Check if your can install the package

Finally, after saving changes and running sudo apt-get update , proceed with the installation of the checkinstall package with the following command:

sudo apt-get install checkinstall

Now you should be able to install this package without any issue.

Источник

E: Unable to Locate Package Error in Kali Linux

unable to locate package

Many times when you install any pkg in your Kali Linux, then you will get an error – “E: Unable to locate“.

Due to this error, you are unable to install your desired pkg on your computer and it can make problems for you during learning Kali Linux or penetration testing.

So today we will resolve a common issue which is – “E: Unable to locate in Kali Linux“. Even you can fix this problem in other operating systems also.

Solve Error: Unable to Locate Package in Kali Linux

The “E: Unable to locate package” error message in Kali Linux shows when the package you are trying to install is not found in the repository you are using. Here are a few things you can try to resolve this issue:

1: Update the Package Cache

maybe you got this error due to an older package cache, so you need to update your system cache, Even I’m suggesting that you update your entire system also by using the command and this command will update your system cache also.

sudo apt-get update && upgrade

2: Check Your Sources.list

Make sure that the repository you are trying to install the package from is correctly listed in your sources.list file. you need to edit it with either the CLI editor or the text editor. You can check to Edit sources.list, steps given below.

sudo nano /etc/apt/sources.list

3: Try a different repository

If the package is not available in the default Kali Linux repositories, try searching for it in other repositories. You can add a new repository to your sources.list file.

4: Install the package from the .deb file

If the package is not available in any repository, you can try downloading the .deb file from a trusted source and installing it using the dpkg command. If you want to know How to Install .deb package in Kali Linux then click on the link to read about .deb installtion process.

5: Check if the package is available for your version of Kali Linux

Some packages may not be available for the latest version of Kali Linux. In this case, you may need to install an older version of the package or find an alternative solution.

Читайте также:  Linux mint mate панель

Fix: Unable to Locate Package using source.list

If this similar problem is in your Kali Linux Machine, then I will show you how you can solve this error, the process step-by-step.

I can say that after reading this post, you will never have to face this problem on your computer. So follow the steps below.

  • Open File Application in Kali Linux
  • Then Go to the location computer/etc/apt/
  • Now you will see a file named “sources.list” just open this file.
  • Remove your all code
  • Then copy the 3 lines of code given below and paste them into that file.
  • Save this file by pressing ‘Ctrl + S’
  • Open Terminal and don’t forget to use “sudo apt-get update“.

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

Solve This Error using Terminal

Step: 1 Open your Terminal.
Step: 2 Type – ” nano /etc/apt/source.list ” and hit Enter.
Step: 3 And you can see we have opened the “Sources.list” file.

(Unable to locate – This error is the repository issue you can see I don’t have any repositories in this sources.list, so we need to add the repositories.)

Step: 4 Click the Link Given in Below and Download the repository.
Step: 5 Click Me to Kali Linux Repository
Step: 6 After opening the Link you can see, that we are on this page of Kali talks official documentation.
Step: 7 Then find the ” Kali sources.list Repositories ” and click on that link.
Step: 8 Now, we are on Kali sources.list repositories
Step: 9 Then Copy the Command of ” Regular Repositories “.
Step: 10 After the copy, of this command, come back to your terminal and paste it over here.
Step: 11 After Paste this command hit Enter Two Time.
Step: 12 Then Go to that Page Again and here we have these source repositories.
Step: 13 Copy this “source repositories” command.
Step: 14 Come back to the terminal and paste it here, but now do not need to hit Enter.
Step: 15 So you can see repositories are now added.
Step: 16 After that, you need to press the ” Ctrl + O ” key on the keyboard.
Step: 17 Then hit Enter and it will save.
Step: 18 For Exit these sources.list file just presses “Ctrl+X” on the keyboard.
Step: 19 Now you can try to install any Pkg.

I can tell guaranty that now you will not get this error – “E: Unable to locate”. Still, if your problem is not fixed then you can join our community forum and ask about it from experts.

If you still have this problem or any other such problem, then you can tell me in the comment box.

And for this problem do not come to your friends, you can also share it with your friends.

Источник

Оцените статью
Adblock
detector