Skip to content
Paynalton
English
Search

Technical text

Packages and dependencies in GNU/Linux

Packages, dependencies, and updates in GNU/Linux.

Author: Paynalton

Published: 2009

Original publication






One of the main problems with GNU/Linux since its inception
has always been standardization. And it’s that GNU/Linux has
always been an open project for everyone, where thousands of hands
have created a small piece of code. But, after all, humans are
not always going to agree, and with so many hands involved, it’s
difficult to have order, since each person can have a Linux completely
different from what their neighbor has.

Then application
developers have a big problem: When they create their
program, they use different libraries to save work and
check that it works correctly on their system. But if the developer
wants to distribute it, it’s very likely that
other computers don’t have the same libraries that they used or
simply that they are in a different directory than expected,
which makes their program incompatible with other systems.

This
creates a major problem that was initially attempted to be
solved through LSB (Linux Standard Base), which proposed
a set of standard libraries that programmers could rely
on to always find in any Linux system.

However, this plan
did not progress as expected, and LSB became a solution that was not
well accepted, as there were serious discussions about which library
was better than another, a program that caused instability with
another, or that was too unsafe, and it ended with the breaking of relations
with some important companies.

And until a few years
ago, installing a program on Linux was a nightmare, because
to have it you had to find and install every single program
required to make that program work.

A first
solution was the installation packages. A user who wanted to install
a program had to look for the respective installation package (.deb,
.ebuild, .rpm, etc.) for their system, and the installer system
checked the program’s dependencies, warning if any were missing and
sometimes suggesting where to download the missing program.

Later, some
of these installation systems could download the installation
packages for the missing programs (dependencies) to make
the user’s life much easier.

All of this has evolved until reaching the current repository systems.

REPOSITORY SYSTEMS

Almost any version of GNU-Linux comes with a repository system. But what the hell is that?

Users
who migrate from one system to another are surprised to find that
they no longer have to spend hours searching the internet for
a program to install, but instead find a list of programs to install
within their Linux system.

A repository is that, a list of
programs that is maintained by the large number of users
and developers of a particular distribution. Every time a new program
or a new version of it appears, a group of enthusiasts reviews
the dependencies of that program, installs them, and checks
their stability, security, and various conflicts with other
applications. After a period of testing, the program is placed
in the list of “stable programs” where regular users can use it
with full confidence.

therefore a user who wants to install a program just needs to do the following:

Recognize
the installer system being used; for Red Hat and Fedora, YUM is used,
for those coming from Debian, APT is used, for Gentoo it’s PORTAGE,
and sorry if by ignorance I omitted any.

Then they should update the list of programs from the distribution’s site by running a simple command:

Code:

#apt-get update
#emerge --sync


Once this is done, they perform a search to find their program.

Code:

$apt-cache search programa
$emerge -s programa
$yum search programa


Once they have the exact name of the program, they simply run another command to install it:

Code:

#apt-get install programa
#emerge programa
#yum install programa


And that’s it, the system will perform the following actions:

  • look for the latest stable version of the program
    - calculate the number of dependencies for the
    program - download all the necessary files to install the program and its dependencies -
    verify that the downloaded files are not corrupted (either due to an error in the download or because someone very bad
  • has altered the package) -
    decompress all the files - install
    all the programs - configure
    all the programs - display options
    for things that require the user’s attention (such as accepting contracts or providing specific equipment details). And with
    that, your program will be installed…

    Very easy, isn’t it? no? why not?

    If
    the command line isn’t your thing, almost all distributions now
    come with a graphical interface for their installer. That executes
    those three simple commands for you, so all you have to do
    is: find the program, select the one you want to install, and
    click “Install”…

    Do you like danger?

    Every
    repository system is by default set up to use stable
    versions of the system, but if you’re brave enough, you can
    always configure it to use unstable repositories to always
    get the latest programs straight from the forge (sourceforge),
    and if you find any errors, don’t forget to report
    them so that, in the next update, it is fixed not only for you,
    but for everyone who uses that program.

    I forgot, updates.

    You can
    update your entire system, including all and every
    one of the installed programs with a single command:

Code:

#yum update
#apt-get upgrade
3emerge -u world


And
with this you will always keep your system in the best condition and
obviously, there are also graphical interfaces for all of this and automatic
notifiers that inform you of new available updates.

Good luck, if there are any questions then it’s time.

Download formats

Search content

Search through published texts and narrow results by content type or topic.

Open Explore