Table of Contents
In this article, we will see how to install Gdebi on Ubuntu 22.04. Many times you might have observed that when you try to install any debian(.deb) packages on your Ubuntu/Debian based systems through dpkg utility, it fails with dpkg: dependency problems
error. It is simply because dpkg
utility itself cannot handle the dependencies. You either have to use sudo apt-get -f install
command to resolve and install the dependencies in case of remote(http, ftp) located package repositories or you can use some effective tools like Gdebi which specializes in installing both local as well as remote .deb
files (Debian packages).
Gdebi is a lightweight, free and open source utility to install debian(.deb) packages on Ubuntu/Debian based systems with all its dependencies handled. It provide both GUI as well as console interface to install the packages. Since it comes with GUI interface, it is easy to use and favored by users who prefer graphical tools over command-line interfaces. Gdebi focuses on resolving dependencies for a single package instead of updating the entire list of repositories, so it is faster and quicker in some cases. It is also quite easy to download and install. Here we will see the steps to install Gdebi on Ubuntu 22.04 based systems.
How to Install Gdebi on Ubuntu 22.04
Also Read: Solved "sudo: add-apt-repository: command not found"
Step 1: Prerequisites
a) You should have a running Ubuntu 22.04
Server.
b) You should have sudo
or root
access to run privileged commands.
c) You should have apt
or apt-get
utility available in your Server.
Step 2: Update Your Server
It is always a good practice to check for latest available updates and install them by using sudo apt update && sudo apt upgrade
command before installing any new packages in the system.
cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:6 https://ngrok-agent.s3.amazonaws.com buster InRelease
Hit:7 https://artifacts.elastic.co/packages/8.x/apt stable InRelease
Hit:8 https://ppa.launchpadcontent.net/unit193/encryption/ubuntu jammy InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
apparmor libapparmor1
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Step 3: Install Gdebi
In the next step, you can install gdebi package by using sudo apt install gdebi-core
command as shown below. This will download and install the package along with all its dependencies.
cyberithub@ubuntu:~$ sudo apt install gdebi-core Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: libwxbase3.0-0v5 libwxgtk3.0-gtk3-0v5 Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: gdebi-core 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 133 kB of archives. After this operation, 876 kB of additional disk space will be used. Get:1 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 gdebi-core all 0.9.5.7+nmu6 [133 kB] Fetched 133 kB in 6s (24.2 kB/s) Selecting previously unselected package gdebi-core. (Reading database ... 237021 files and directories currently installed.) Preparing to unpack .../gdebi-core_0.9.5.7+nmu6_all.deb ... Unpacking gdebi-core (0.9.5.7+nmu6) ... Setting up gdebi-core (0.9.5.7+nmu6) ... Processing triggers for man-db (2.10.2-1) ...
Step 4: Check Version
You can verify the current installed version by running gdebi --version
command as shown below.
cyberithub@ubuntu:~$ gdebi --version 0.9.5.7+nmu6
Step 5: Verify Installation
After successful installation, you can verify the status by running dpkg -s gdebi-core
command as shown below.
cyberithub@ubuntu:~$ dpkg -s gdebi-core Package: gdebi-core Status: install ok installed Priority: optional Section: admin Installed-Size: 855 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: all Source: gdebi Version: 0.9.5.7+nmu6 Depends: python3:any (>= 3.3~), python3-apt, python3-debian, file Suggests: xz-utils | xz-lzma Description: simple tool to install deb files gdebi lets you install local deb packages resolving and installing its dependencies. apt does the same, but only for remote (http, ftp) located packages. . It can also resolve build-depends of local debian/control files. . This package contains the libraries and command-line utility. Original-Maintainer: gdebi developers <gdebi@packages.debian.org>
Step 6: Using Gdebi
Now that Gdebi utility is installed, let's use it to install a debian(.deb) package and test if it is able to resolve and install the dependencies. Here we have a sample veracrypt-console
debian package downloaded from official website. We are installing this package by using sudo gdebi veracrypt-console-1.26.7-Ubuntu-22.04-amd64.deb
command as shown below. As you can see from the output, it is able to detect and install all the required dependencies.
cyberithub@ubuntu:~$ sudo gdebi veracrypt-console-1.26.7-Ubuntu-22.04-amd64.deb Reading package lists... Done Building dependency tree... Done Reading state information... Done Reading state information... Done Requires the installation of the following packages: libccid libfuse2 pcscd Disk encryption with strong security based on TrueCrypt. Disk encryption with strong security based on TrueCrypt. Do you want to install the software package? [y/N]:y /usr/bin/gdebi:113: FutureWarning: Possible nested set at position 1 c = findall("[[(](\S+)/\S+[])]", msg)[0].lower() Get:1 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 libccid amd64 1.5.0-2 [83.1 kB] Get:2 http://in.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 pcscd amd64 1.9.5-3ubuntu1 [58.1 kB] Get:3 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 libfuse2 amd64 2.9.9-5ubuntu3 [90.3 kB] Fetched 231 kB in 0s (0 B/s) Selecting previously unselected package libccid. (Reading database ... 237093 files and directories currently installed.) Preparing to unpack .../libccid_1.5.0-2_amd64.deb ... Unpacking libccid (1.5.0-2) ... Selecting previously unselected package pcscd. Preparing to unpack .../pcscd_1.9.5-3ubuntu1_amd64.deb ... Unpacking pcscd (1.9.5-3ubuntu1) ... Selecting previously unselected package libfuse2:amd64. Preparing to unpack .../libfuse2_2.9.9-5ubuntu3_amd64.deb ... Unpacking libfuse2:amd64 (2.9.9-5ubuntu3) ... Setting up libccid (1.5.0-2) ... Setting up pcscd (1.9.5-3ubuntu1) ... Created symlink /etc/systemd/system/sockets.target.wants/pcscd.socket → /lib/systemd/system/pcscd.socket. pcscd.service is a disabled or a static unit, not starting it. Setting up libfuse2:amd64 (2.9.9-5ubuntu3) ... Processing triggers for libc-bin (2.35-0ubuntu3.4) ... Processing triggers for man-db (2.10.2-1) ... Selecting previously unselected package veracrypt-console. (Reading database ... 237135 files and directories currently installed.) Preparing to unpack veracrypt-console-1.26.7-Ubuntu-22.04-amd64.deb ... Unpacking veracrypt-console (1.26.7-1) ... Setting up veracrypt-console (1.26.7-1) ...
Step 7: Uninstall Gdebi
Once you are done using Gdebi, you can choose to uninstall it from your system by using sudo apt remove gdebi-core
command as shown below.
cyberithub@ubuntu:~$ sudo apt remove gdebi-core Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages will be REMOVED: gdebi-core 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded. After this operation, 876 kB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 237592 files and directories currently installed.) Removing gdebi-core (0.9.5.7+nmu6) ... Processing triggers for man-db (2.10.2-1) ...
Thanks for the info. The article was very nicely illustrated.