What is a package dependency in Linux?

Let's learn about Linux dependencies and their impact on Linux package management.

Linux programs are created from building blocks of software

What is a package dependency in Linux? Picture 1

Linux dependencies are simply things a program needs to run. This is because Linux developers tend to write programs in a modular way, similar to the 'Unix philosophy' of building programs from smaller components.

 

Dependency are usually shared libraries. They can be for things like accessing databases, using network protocols, or drawing graphical elements on the screen. While proprietary programs also use shared libraries, that's easier to do in the Linux world because they're also often open source.

Dependency can also be complete program. A common pattern in the Linux world is to build a GUI user interface for an existing command line program.

Using shared libraries makes development easier because developers don't have to come up with new ways to do things every time they want to create a new application.

How Package Managers Make Linux Software Installation Easier

You can download the source code from the open source program's website and try to compile it yourself, but you'll often see something missing. This is because these projects don't include any dependencies with their program, assuming you have them installed or are willing to do so.

This worked well in the early days of Unix, running on mini PCs and mainframes with dedicated admin teams, but as Linux started to gain popularity on PCs, the old way was hard to manage for those who didn't. Single user may not have much Unix experience.

Linux distributions are starting to include package management tools that keep track of dependencies, download them over the Internet, and install and update them when a new version is available.

Flatpak and Snap are the latest efforts to manage dependencies by making them available through an application. This way, dependencies and applications can be better synchronized. Developers have more control over how the app will behave when it gets to users.

How to view package dependencies on Linux

The Linux distro package sites can show any package dependency. You can also see what dependencies a package has using the package manager.

 

On Debian or Ubuntu, use APT:

apt show [packagename]

What is a package dependency in Linux? Picture 2

On Arch, use pacman with the -Si option. The Depends on section will display the dependencies.

pacman -Si [packagename]

What is a package dependency in Linux? Picture 3

On Red Hat-based Linux distributions, use DNF:

dnf deplist [packagename]

What is a package dependency in Linux? Picture 4

 

Dependency is not so mysterious on Linux. They show how Linux programs are built from smaller components. The package manager makes software installation easier by keeping track of packages.

It is also possible to see what dependencies the package has. They are also why you should update your package manager when installing new programs.

3.5 ★ | 2 Vote

May be interested

  • How to install Pip in UbuntuHow to install Pip in Ubuntu
    linux has a lot of package managers. ubuntu not only has apt but also many programming languages ​​that come with its own package manager. pip stands for python packages packages and allows you to easily install packages from python package index (pypi).
  • How to install Skye on UbuntuHow to install Skye on Ubuntu
    there are actually several ways to install skype on linux. this article will show you how to install skype on ubuntu using the snap package or download directly from the microsoft website.
  • How to Create DEB Packages for Debian and UbuntuHow to Create DEB Packages for Debian and Ubuntu
    the deb file in debian-based operating systems like ubuntu and kali linux is equivalent to the exe file found in windows.
  • What is Gentoo Linux? How to install?What is Gentoo Linux? How to install?
    gentoo linux is a powerful and scalable distribution that sticks to the original source-based package management mechanism.
  • Chocolatey or Windows Package Manager is the better tool to download Windows software?Chocolatey or Windows Package Manager is the better tool to download Windows software?
    the package manager can make installing and configuring applications on windows very easy. like apt-get, homebrew or yum on linux and macos, you can use chocolatey or windows package manager (winget) on windows 10 and 11.
  • NPM in Node.jsNPM in Node.js
    provides utilities to install node.js packages, version management and dependency management of packages in node.js.
  • Instructions for registering V90 package is only 90k to receive the super 3-in-1 integration right awayInstructions for registering V90 package is only 90k to receive the super 3-in-1 integration right away
    v90 viettel package has just been officially launched, creating a hot fever for all subscribers who are using the service of the network because of too great incentives to have any promotion packages that match at the present time.
  • Package in PythonPackage in Python
    we will learn how to divide code into efficient, clear modules, using python packages. plus, the way to import and use your own package, or the package you download from somewhere into the python program.
  • How to check Internet package network FPT, VNPT, Viettel are usingHow to check Internet package network FPT, VNPT, Viettel are using
    regularly checking internet network packages fpt, vnpt, viettel are using the following ways to make it easier for you to monitor internet connection speed, and if you encounter any problems, you can contact immediately network operators to ensure that the line is always stable, without affecting your work or leisure time.
  • How to Install and Use Homebrew on LinuxHow to Install and Use Homebrew on Linux
    although different linux distributions come with their own package managers, you will need homebrew on your system if you want to install programs that are not available in the default linux distro repositories.