Information Security Squad
stay tune stay secure
4 шага, чтобы исправить Unable to locate package virtualbox-guest-x11Kali Linux
Вы не поверите, как быстро эта проблема с Kali Linux может быть исправлена.
Вам просто нужно добавить одну строку в ваш файл /etc/apt/sources.list.
Вам нужно добавить эту строку в /etc/apt/sources.list:
deb http://http.kali.org/kali kali-rolling main contrib non-free
Вы можете редактировать файл, используя следующие шаги
nano /etc/apt/sources.list + enter
добавить строку (deb http://http.kali.org/kali kali-rolling main contrib non-free)
Ctrl + X + Enter
y + enter
Шаги, которые необходимо предпринять после добавления строки, которая устранит проблему «unable to locate package virtualbox-guest-x11»:
- apt-get update
- apt-get upgrade -y
- apt-get dist-upgrade -y
- apt-get install linux-headers-$(uname -r)
Приведенные выше действия обеспечат обновление вашей системы.
Теперь попробуйте установить пакет virtualbox-guest-x11 снова
How to solve Kali Linux apt-get install: E: Unable to locate package checkinstall
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:
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:
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:
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.
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:
Now you should be able to install this package without any issue.
[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 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.
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:
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.
Can’t install anything on Kali Linux (Unable to locate package..) [closed]
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 10 months ago .
When I try to install a package or anything, I get the following error:
How do I resolve this to install my packages?
3 Answers 3
Solved Unable to Locate Package Issue
- Enter the command: leafpad /etc/apt/sources.list
- Remove everything within that sources.list file
- Google for «Kali Linux Repository» or use this link: Kali Linux Repository
- Scroll down and look for «The kali-rolling repository»
- Copy everything within that kali-rolling and paste on sources.list file
- Save the sources.list file
- Run the command: apt-get update
- 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:
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.
Jean Martins
jeanfmc.github.io
Kali Linux: Fix “Unable to locate package” | Installing parallels tools (and linux-headers)
Hi, lets see how we can fix our linux Kali to be able to locate the packages that we want like linux-headers-… and others.
Error sample:
I’m using parallels on mac, and when i start my VM, the parallels show me the message to install parallels tools, but the installation failed:
It’s happen because our Kali don’t know where they can get this packages.
To fix it, open the terminal, and edit the file /etc/apt/sources.list
Replace:
# deb cdrom:[Debian GNU/Linux 2017.3 _Kali-rolling_ – Official Snapshot amd64 LIVE/INSTALL Binary 20171109-13:49]/ kali-rolling contrib main non-free
#deb cdrom:[Debian GNU/Linux 2017.3 _Kali-rolling_ – Official Snapshot amd64 LIVE/INSTALL Binary 20171109-13:49]/ kali-rolling contrib main non-free
# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ – Official Snapshot i386 LIVE/INSTALL $
# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ – Official Snapshot i386 LIVE/INSTALL $
Like:
And now:
- apt-get clean
- apt-get update
- apt-get -f install
Ready! So now you can install the others modules for parallels.
- apt-get install linux-headers-4.13.0-kali1-amd64
- apt-get install dkms
- apt-get install kpartx
- apt-get install printer-drive-postscript-hp
It’s it, simple like fly.