Sorry, you have been blocked
This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
What can I do to resolve this?
You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.
Cloudflare Ray ID: 7d99dcc2d8d777bc • Your IP: Click to reveal 88.135.219.175 • Performance & security by Cloudflare
Install deb package on Kali Linux [4 Methods]
There are two ways you can use to install software on your Kali Linux system. You can use the Terminal method, where you will use the apt package manager or other distribution-independent package platforms like Snap, AppImage, and FlatPak. The other way is downloading the installer file (usually the .deb file) and installing it on your system.
Installing Deb files on Debian-based distributions like Ubuntu and Debian distribution can be easy since these operating systems come with the software centre. The software centre is a utility where users can find, download and install software graphically. When you have a .deb file, you will right-click on the file and select the option «install with software centre. «Unfortunately, Kali Linux doesn’t have the software centre installed by default, and you will have to install the .deb file using the Terminal. Luckily, it’s not hard as you would think.
This post will give you a detailed guide to installing .deb files on Kali Linux. Let’s dive in.
Method-1: Install DEB package with DPKG
DPKG is a command-line tool used to install, build, remove and manage Debian packages on Linux systems. It comes with various options, which you can view by running the command:
To install a package with dpkg, launch the Terminal and use the cd command to navigate to the file’s location and install it with the syntax below.
In our case, we will install the VSCode.deb file. VSCode is a powerful IDE developed by Microsoft and includes support for different languages like Python, Java, C++, JavaScript, and more
Sample Output:
You will notice that we have an additional command sudo apt install -f .
That’s because when you use dpkg to install a package on Linux, it will check your system for all the dependencies required to install and run the software. If even a single dependency is not satisfied (which is the case most of the time), the package is left in an «unconfigured» state and considered broken.
The apt install -f command tries to install any of the missing dependencies. When you read the apt man page, you will see the -f parameter stands for —fix-broken .
Method-2: Install DEB package With DPKG
Alternatively, you can avoid any dependency errors by first checking for the dependencies required by the package and install them first; You can do so by executing the command below.
Sample Output:
That will list all the dependencies required to install the vscode.deb file. You can now install these dependencies using the apt command shown below:
After installing all the required dependencies, proceed to install the deb file with the command below.
Method-3: Install DEB Files With APT Package Manager
Other than DPKG, you can also use the apt command to install deb files on your Kali Linux system. However, this method works in every unique way and requires one to have an active internet connection. That’s because apt first makes a list of all the required dependencies and installs them from the repository. When done, it calls the dpkg utility and uses it to install the file. Therefore, the apt method uses dpkg under the hood.
To install a package with apt, launch the Terminal and use the cd command to the file’s directory and use the syntax below to install the file.
Sample Output:
Method-4: Install DEB Files With GDEBI
GDEBI is a command-line utility that enables you to install deb files smoothly by proper handling of dependencies. We say «smooth installation» because dpkg can be pretty aggressive at times when installing specific packages.
For example, when I tried installing the skype deb file with dpkg, it attempted to remove 96 packages, including system libraries necessary for running other tools and software. GDEBI works similarly to the apt command. It will first install all the required dependencies before installing the deb package.
GDEBI does not come pre-installed in Kali Linux. To install it, use the command below:
Sample Output:
Once done, proceed to install the deb package with the syntax below.
Sample Output:
Conclusion
That’s it! I believe you now have three ways you can use to install a deb file on your Kali Linux system. If you have an active internet connection, I highly advise you to use the apt install ./<package_name> method or gdebi. However, if you don’t have internet access, use the dpkg -i command, which does not install any required libraries. But if you encounter any error, you will need to run apt install -f to install any missing dependencies, which requires internet access. Feel free to hit the comments below in case you come across any challenges.
Didn’t find what you were looking for? Perform a quick search across GoLinuxCloud
If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.
For any other feedbacks or questions you can either use the comments section or contact me form.
Thank You for your support!!
3 thoughts on “Install deb package on Kali Linux [4 Methods]”
thankk u very much it helped for my online class.i am using kali linux. officialy they said cisco webex is not avalable for kali but you helped me thank youuuuuuu very muchhhhhhh.
Как установить deb пакет в kali linux
In this walkthrough we will be explaining certain things that are only on a VM. It is your choice if you want to install a full Kali system (or if you already have one, if you want to use it) or if you want to use a VM, however keep in mind what commands you’re entering if it is an install.
Setting up the VM
It’s important to set up a development environment. The easiest way to go about this is to set up a VM with the latest Kali image and give it a large filesystem. 80GB+ is good for a few packages at a time, however 150GB+ is recommended if you are using mr to download all packaging repositories. Likely, you will not need all of the packages to be downloaded.
Installing packages
We will install tools that we will use later for packaging. packaging-dev is a metapackage, and will install many of the proper packages that are needed:
User accounts and keys
Packaging needs to be done on a non-root user with sudo privileges. The default Kali user is suitable for this.
you must log out of your account and switch to the new user (rather than using su ). This is done as some pieces (such as variables that are set) of the following setup require you to be on that account, su will not work.
Next, we should generate SSH and GPG keys. These are important for packaging as they will allow us to access our files on GitLab easily and ensure the work is ours. This step is not always necessary, however it is helpful in certain cases. You will know if you need to set up a GPG key, however we recommend setting up an SSH key as it will make the packaging process quicker:
Please remember to change “First Last [email protected] ” to be your name and email.
The next step is to add the SSH key to your GitLab account. This can be done in the keys section. Run the commands below to put the key in the copy-paste buffer and paste it on GitLab’s web page:
Setting up files
We now need to set up git-buildpackage/ gbp buildpackage :
Be sure to replace [email protected] with your email, and ensure it is the same one used with your GPG key, if that was setup.
We enable pristine-tar by default as we will use this tool to (efficiently) store a copy of the upstream tarball in the Git repository. We also set export-dir so that package builds happen outside of the git checkout directory.
Below, we’re customizing some useful tools provided by the devscripts package:
Be sure to put your own key id in DEBSIGN_KEYID . In this example we can see from gpg -k that our key is ABC123DE45678F90123G4567HIJK890LM12345N6
You may also want to add the following to your git config:
The user.name and user.email must match your gpg key details ( gpg -k ) or you will get a “Secret Key Not Available” error later on. Be sure to put your own key id in user.signingkey . In this example we can see from gpg -k that our key is ABC123DE45678F90123G4567HIJK890LM12345N6
We also want to enable a dedicated git merge driver for the debian/changelog files:
sbuild
We also will need to set up sbuild. Although this isn’t too difficult, it does require some extra setup:
Once that is done, we need to edit /etc/schroot/chroot.d/kali-dev-amd64-sbuild* , note that “*” is used as it will generate the last bit randomly. Alternatively, use TAB auto-completion:
Finally, we just need to add our user to the group and do one last change:
apt-cacher-ng
When building a package with a sbuild, a lot of time (and bandwidth) is spent downloading the build dependencies. To speed up this step, it’s possible to use a caching proxy, such as apt-cacher-ng:
Check the version that was installed. If it’s below 0.6.1-1 , Kali is not supported out of the box, and there’s a little config to do:
In the snippet above, note that:
- The file kali_mirrors lists all the mirrors for which apt-cacher-ng will cache the requests. In this list, there should be at least the mirror that you used with the command sbuild-createchroot above.
- The file backends_kali lists the mirror that apt-cacher-ng will actually use to download packages. You should set it to a mirror that is close to you.
Finally, we just need to add a line of configuration inside our chroot, so that apt is configured to use the proxy:
In order to make sure that everything works, there’s a few things you can do:
Как установить локальный .deb пакет
Файлы с расширением .deb — это установочные пакеты для Debian и производных дистрибутивов, для таких, как Linux Mint, Kali Linux, Ubuntu.
Типичный способ установки пакета из файла DEB:
С помощью этих команд устанавливаются пакеты из стандартных репозиториев — это самый надёжный способ в том плане, что для устанавливаемого пакету будут установлены зависимости и в будущем этот пакет будет обновляться вместе с другими программами в системе. То есть установка из стандартных репозиториев является приоритетной.
Установка скаченных .deb
Иногда может потребоваться установка локальных .deb, то есть файлов не из репозиториев. Примеры, когда потребовалась такая установка:
- Как установить Viber на Linux (необходимо отредактировать пакет Viber, иначе его установки приведёт к проблемам к использованию менеджеров пакетов)
- Как установить Java (JDK) в Windows и Linux (Oracle JDK отсутствует в стандартных репозиториях)
Установка без учёта зависимостей
Следующая команда установит пакет без проверки зависимостей:
При выполнении операции менеджером пакетов, например, обновление кэша:
может возникнуть сообщение об отсутствующих зависимостях, исправить это можно командой:
Установка DEB файла с помощью apt
Программа apt также умеет устанавливать пакеты из указанных файлов, при этом одновременно будут установлены необходимые зависимости для этого пакета:
Установка пакетов с помощью gdebi
Вы можете установить программу gdebi:
И затем устанавливать пакеты с помощью неё:
gdebi также установит необходимые зависимости. На самом деле, gdebi появилась когда apt-get не могла устанавливать локальные файлы (или эта возможность не была документирована), сейчас же вместо gdebi можно использовать apt, которая предустановлена в каждом дистрибутиве, основанном на Debian.