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

In the world of Cybersecurity, Kali Linux is a key tool for experts, and facing package installation issues like the 'E: Unable to locate package checkinstall' error is a common experience. This guide aims to provide straightforward steps to solve this installation challenge, enhancing your skills in managing Kali Linux, an important aspect of any cyber security course. Addressing these errors quickly is essential for those undertaking cybersecurity training. The guide is designed not only as a troubleshooting manual but also as a learning aid for students and self-learners alike.

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.

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

sudo apt-get update

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.

Happy coding !


Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Sponsors