Cyberithub

How to Install Dependent Packages on Ubuntu/Debian Using Gdebi

Advertisements

In this article, we will see how to install dependent packages on Ubuntu/Debian using gdebi. Many times, you might have observed that for some of the applications it is not possible to download and install them from default Ubuntu repo, you will most probably have to download the debian package for that from its official website and then install them using dpkg package manager. But the real problem comes when it expects certain dependencies to be installed before installing the application itself.

dpkg itself is not equipped to find and install all dependencies required by a package so in those cases utilities like gdebi comes very handy. You can simply use gdebi tool instead of dpkg package manager to install those kind of applications. It will not just install the package but it will also detect and install all the required dependencies along with it. Here we will see how you can install gdebi package and then use it to install an application from debian package along with all its dependencies on Ubuntu/Debian based systems.

 

How to Install Dependent Packages on Ubuntu/Debian Using Gdebi

How to Install Dependent Packages on Ubuntu/Debian Using Gdebi

Also Read: How to find files and directories in Linux

Step 1: Prerequisites

a) You should have a running Ubuntu/Debian based System.

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

Before installing gdebi package, it is essential to upgrade your system packages to the latest versions by using sudo apt update && sudo apt upgrade command as shown below.

cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
Hit:1 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Get:2 https://repositories.timber.io/public/vector/deb/ubuntu focal InRelease [4,947 B]
Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease
Ign:4 https://pkg.jenkins.io/debian-stable binary/ InRelease
Hit:5 https://pkg.jenkins.io/debian-stable binary/ Release
Hit:6 https://download.sublimetext.com apt/stable/ InRelease
Hit:7 http://ppa.launchpad.net/flatpak/stable/ubuntu focal InRelease
Hit:8 https://ngrok-agent.s3.amazonaws.com buster InRelease
Hit:9 http://ppa.launchpad.net/gencfsm/ppa/ubuntu focal InRelease
Hit:11 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:12 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 InRelease
Hit:13 https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu focal InRelease
Hit:14 http://ppa.launchpad.net/juju/stable/ubuntu focal InRelease
Hit:15 http://ppa.launchpad.net/libreoffice/ppa/ubuntu focal InRelease
Hit:16 http://ppa.launchpad.net/mojo-maintainers/ppa/ubuntu focal InRelease
Hit:17 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:18 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal InRelease
Hit:19 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:20 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Fetched 4,947 B in 6s (763 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
.......................................

 

Step 3: Install Gdebi

Then install Gdebi from default Ubuntu repo by using sudo apt install gdebi command as shown below. This will download and install the package along with all its dependencies.

cyberithub@ubuntu:~$ sudo apt install gdebi
[sudo] password for cyberithub:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
diffstat gnome-icon-theme libapt-pkg-perl libasync-mergepoint-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libcapture-tiny-perl
libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl libcpanel-json-xs-perl libdevel-callchecker-perl libdevel-size-perl
libdigest-bubblebabble-perl libdigest-hmac-perl libdynaloader-functions-perl libemail-valid-perl libexporter-tiny-perl libfile-find-rule-perl
libfont-ttf-perl libfuture-perl libgtk2-perl libimport-into-perl libio-async-loop-epoll-perl libio-async-perl libio-pty-perl libio-string-perl
libipc-run-perl libjson-maybexs-perl liblinux-epoll-perl liblist-compare-perl liblist-moreutils-perl libmodule-implementation-perl libmodule-runtime-perl
libmoo-perl libmoox-aliases-perl libnamespace-clean-perl libnet-dns-perl libnet-dns-sec-perl libnet-domain-tld-perl libnet-ip-perl libnet-libidn-perl
libnumber-compare-perl libpackage-stash-perl libpackage-stash-xs-perl libpango-perl libparams-classify-perl libpath-tiny-perl libperl4-corelibs-perl
libperlio-gzip-perl libreadonly-perl libref-util-perl libref-util-xs-perl librole-tiny-perl libsereal-decoder-perl libsereal-encoder-perl libsereal-perl
libstrictures-perl libstruct-dumb-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-name-perl libsub-quote-perl libtest-fatal-perl
libtest-refcount-perl libtext-glob-perl libtext-levenshtein-perl libtype-tiny-perl libtype-tiny-xs-perl libunicode-utf8-perl libvariable-magic-perl
libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl libxml-writer-perl libyaml-libyaml-perl
lintian patchutils t1utils
Suggested packages:
libgtk2-perl-doc libscalar-number-perl libbareword-filehandles-perl libindirect-perl libmultidimensional-perl libdevel-lexalias-perl
libdevel-stacktrace-perl libxml-sax-expatxs-perl binutils-multiarch libtext-template-perl
The following NEW packages will be installed:
diffstat gdebi gnome-icon-theme libapt-pkg-perl libasync-mergepoint-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libcapture-tiny-perl
libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl libcpanel-json-xs-perl libdevel-callchecker-perl libdevel-size-perl
libdigest-bubblebabble-perl libdigest-hmac-perl libdynaloader-functions-perl libemail-valid-perl libexporter-tiny-perl libfile-find-rule-perl
libfont-ttf-perl libfuture-perl libgtk2-perl libimport-into-perl libio-async-loop-epoll-perl libio-async-perl libio-pty-perl libio-string-perl
libipc-run-perl libjson-maybexs-perl liblinux-epoll-perl liblist-compare-perl liblist-moreutils-perl libmodule-implementation-perl libmodule-runtime-perl
libmoo-perl libmoox-aliases-perl libnamespace-clean-perl libnet-dns-perl libnet-dns-sec-perl libnet-domain-tld-perl libnet-ip-perl libnet-libidn-perl
libnumber-compare-perl libpackage-stash-perl libpackage-stash-xs-perl libpango-perl libparams-classify-perl libpath-tiny-perl libperl4-corelibs-perl
libperlio-gzip-perl libreadonly-perl libref-util-perl libref-util-xs-perl librole-tiny-perl libsereal-decoder-perl libsereal-encoder-perl libsereal-perl
libstrictures-perl libstruct-dumb-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-name-perl libsub-quote-perl libtest-fatal-perl
libtest-refcount-perl libtext-glob-perl libtext-levenshtein-perl libtype-tiny-perl libtype-tiny-xs-perl libunicode-utf8-perl libvariable-magic-perl
libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl libxml-writer-perl libyaml-libyaml-perl
lintian patchutils t1utils
0 upgraded, 82 newly installed, 0 to remove and 2 not upgraded.
Need to get 14.8 MB of archives.
After this operation, 36.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
.....................................................

 

Step 4: Check Version

After successful installation, you can check the current installed version by using gdebi --version command as shown below.

cyberithub@ubuntu:~$ gdebi --version
0.9.5.7+nmu3

 

Step 5: Verify Installation

You can also verify the installed files path by using dpkg -L gdebi command as shown below.

cyberithub@ubuntu:~$ dpkg -L gdebi
/.
/usr
/usr/bin
/usr/share
/usr/share/application-registry
/usr/share/application-registry/gdebi.applications
/usr/share/applications
/usr/share/applications/gdebi.desktop
/usr/share/doc
/usr/share/doc/gdebi
/usr/share/doc/gdebi/README
/usr/share/doc/gdebi/copyright
/usr/share/gdebi
/usr/share/gdebi/GDebi
/usr/share/gdebi/GDebi/GDebiGtk.py
/usr/share/gdebi/GDebi/SimpleGtkbuilderApp.py
/usr/share/gdebi/gdebi-gtk
/usr/share/gdebi/gdebi.png
/usr/share/gdebi/gdebi.ui
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/gdebi-gtk.1.gz
/usr/share/polkit-1
/usr/share/polkit-1/actions
/usr/share/polkit-1/actions/com.ubuntu.pkexec.gdebi-gtk.policy
/usr/share/python3
/usr/share/python3/runtime.d
/usr/share/python3/runtime.d/gdebi.rtupdate
/usr/bin/gdebi-gtk
/usr/share/doc/gdebi/changelog.gz

 

Step 6: Install a Package

Now that gdebi utility is installed, let's download and install a sample debian package to test the installation of dependent packages. You can download the latest version of Virtualbox debian package from official website and install that by using sudo gdebi virtualbox-7.0_7.0.12-159484~Ubuntu~focal_amd64.deb command as shown below. As you can see, it detects and install all the required dependent packages.

cyberithub@ubuntu:~$ sudo gdebi virtualbox-7.0_7.0.12-159484~Ubuntu~focal_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
Requires the installation of the following packages: libqt5help5 libqt5opengl5 libqt5printsupport5 libqt5sql5 libqt5sql5-sqlite libqt5x11extras5 libqt5xml5

Oracle VM VirtualBox
VirtualBox is a powerful PC virtualization solution allowing you to run a
wide range of PC operating systems on your Linux system. This includes
Windows, Linux, FreeBSD, DOS, OpenBSD and others. VirtualBox comes with a broad
feature set and excellent performance, making it the premier virtualization
software solution on the market.
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 focal-updates/universe amd64 libqt5sql5 amd64 5.12.8+dfsg-0ubuntu2.1 [121 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5help5 amd64 5.12.8-0ubuntu1 [134 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libqt5opengl5 amd64 5.12.8+dfsg-0ubuntu2.1 [136 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libqt5printsupport5 amd64 5.12.8+dfsg-0ubuntu2.1 [193 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libqt5sql5-sqlite amd64 5.12.8+dfsg-0ubuntu2.1 [47.6 kB]
Get:6 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5x11extras5 amd64 5.12.8-0ubuntu1 [10.3 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libqt5xml5 amd64 5.12.8+dfsg-0ubuntu2.1 [105 kB]
Fetched 747 kB in 0s (0 B/s)
.....................................................

 

Step 7: Check all available options

If you are looking to check all the options available with gdebi command then you have to use gdebi --help command as shown below.

cyberithub@ubuntu:~$ gdebi --help
Usage: gdebi [options] filename
For a graphical version run gdebi-gtk


Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -n, --non-interactive
                        Run non-interactive (dangerous!)
  -o APT_OPTS, --option=APT_OPTS
                        Set an APT configuration option
  -q, --quiet           Do not show progress information
  --apt-line            Simulate only and print a apt-get install compatible
                        line to stderr
  --root=ROOTDIR        Use alternative root dir

Leave a Comment