Isso é adaptado e atualizado de esta resposta pelo usuário “ Interessante ... ”:
Step 1
To add repositories on most (if not all) Debian-derivative systems, the main way to go about doing this is to edit your
sources.list
file, found in/etc/apt/sources.list
. To do this, use any editor of your choice to open the file.It should look like this if you have never modified the
sources.list
file, and Kali was installed correctly: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
Source: https://docs.kali.org/general-use/kali-linux-sources-list-repositories
Now you can add any repositories you like by adding the repository address to the next line in your
sources.list
file and saving. Once saved, move on to Step 2.Step 2
The next step is to clean out all cached and non-wiped files from
/var/cache/apt/archives/
and/var/cache/apt/archives/partial/
. To do this, run the commandapt-get clean
. Next, update your package index files (so you can install packages from the repository you added) by runningapt-get update
. Upgrade all installed packages so you can download dependencies and resolve out-conflicts by runningapt-get upgrade
. The new repository you added may have some core packages, or system applications that need to be installed, so do so by using a smart dependency conflict resolution update withapt-get dist-upgrade
. You should now be ready to go.Warnings and Other Information
Generally for Kali (and usually for Kali only) it is a very bad idea to add repositories to your system, because they might break your Kali install. Because one of the main core functionalities of Kali is all the packages that come preinstalled, in a system manner of speaking, it is very unstable. If you install one package that needs certain dependencies or updates certain dependencies to so it is not backwards compatible, then you will essentially break some (or all) of the packages preinstalled in Kali, defeating the purpose of having Kali at all. Because of this mentality, Kali has grown to become very fragile. While Kali works perfectly well out of the box or with packages that you install from the official repositories, adding repositories may potentially break your system. According to the official Kali docs,
Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL.
significando que você geralmente deve ficar longe de repositórios não oficiais enquanto estiver usando Kali. De fato, de acordo com os documentos de Kali,
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.
Então, se você está seguindo um tutorial na internet ou algo parecido, esteja avisado que adicionar repositórios não oficiais a você
sources.list
é a causa mais comum de um sistema Kali quebrado.Notas Finais
Embora este método funcione nos sistemas GNU / Linux Derivativos, é aconselhável manter os repositórios oficiais do Kali em sua maior parte. Se você quiser, certamente vá em frente e adicione os repositórios, mas é importante saber o que os repositórios fornecem, e quais pacotes, se houver algum, serão atualizados ao iniciar o
apt-get upgrade
, porque eles podem quebrar seus outros pacotes.Se você estiver tentando instalar um determinado programa, eu procuraria o Unix-build para criar sozinho a partir do código-fonte.
Para mais informações sobre o Kali Repositórios, veja aqui: