Competing software installers
Command Line – Installersn
With an increasing number of software installation methods, testing cutting-edge applications may require learning about the installer first.
A well-known xkcd cartoon starts with 14 competing standards [1]. Someone resolves to simplify the situation by developing one standard that covers all the others. The result? Fifteen competing standards. The cartoon reflects a wry truth that has recently been illustrated in a proliferation of software installers that complicates matters for those who install cutting-edge applications. Increasingly, would-be users have to learn a new installer and install more software before they can get to the software they want to try.
When Linux first became popular in the late 1990s, software installation often ended in what was known as "dependency hell," in which users had to track down the correct version of each dependency and risked leaving a package half-installed. One way around this problem was to use static tarballs – archives that included the required dependencies. These were used in the first forays into commercial Linux software, like Loki Entertainment, and they were easy to create with the tar
command. However, static tarballs were not always used, probably because they often meant that one hard drive might contain several versions of the same software, which was wasteful at a time when storage was limited.
Another early solution was to install software written in C or C++ from source, creating the necessary binaries. If you were lucky, the install scripts would even list and install dependencies, although less conscientious developers might still strand users in dependency hell. Installing from source typically begins by switching into the directory that contains the source code and running ./configure
to check that all the required dependencies are already installed (Figure 1). For instance, one of the first checks that ./configure
usually does is to check whether the system has the GCC compiler installed and running correctly. In addition, ./compile
creates the files needed to compile, such as the makefile that contains the basic instructions for compiling. If all dependencies are present, you can then compile the binary using the make
command. If the build is successful, the command make install
installs the application. This system at least provides some minimal guidance in dealing with problems and is still used today, as well as variants like KDE's CMake.
Installation took a giant step forward when Debian became the first distribution to introduce package management. With package management, applications are presented along with an array of scripts that handle dependencies (as well as any alterations to the system before, during, and after installation) and draw from a standard set of online repositories. The efficiency, as well as the economy of memory, meant that package management soon spread to other major distributions. The commands may differ – apt-get
or dpkg
for Debian, yum
or dnf
for Fedora, and pacman
for Arch Linux – but the structure of package managers is much the same in all distributions, with basic commands for installation, deletion, and repository searching and updating, as well as a centralized database for all installations. Several years ago, Ubuntu introduced apt
, a convenient subset of apt-get
functions (Figure 2), but the structure of package management has remained the same for over two decades. Most Linux users have likely used a package manager, if only through a graphical interface.
Universal Packages
Today, Linux computing is vastly different than it was in its infancy. Memory is abundant now, and the restrictions of earlier times no longer seem relevant to many. For instance, on many systems, package installation no longer needs to be part of system administration in order to manage limited system resources. Instead, ordinary users can install software for their own use. Similarly, there is room for multiple versions of resources, something that package management generally avoided. And, most importantly, many developers would prefer to build a single file for all distributions, in effect making software installation on Linux closer to what it is on Windows or macOS.
Currently, there are three main universal package systems: AppImage, Canonical's Snap, and Fedora's Flatpak. Announced in 2016, Snap and Flatpak helped to renew the interest in AppImage (Figure 3). All three are structured much like traditional package management systems and might be said to be a more sophisticated version of static tarballs. However, although all three are highly promising (e.g., Flatpak's home page declares the format "The Future of Apps on Linux"), distributions differ enough in details like the location of files that one format that fits all is not always easy to create. Several distributions like openSUSE now maintain releases in a universal format, but all three universal package systems have become just more standards among many.
The New Installers
Another growing trend is to use the installer included in a programming language. For instance, Carp is the package manager for the Rust programming language. Similarly, Ruby borrows Homebrew from Apple.
The most common of these programming language installers is pip, the Python installer (Figure 4). Until January 2020, a pip version existed for Python releases before 3.x and is undoubtedly still around. For current versions of Python, pip3
is the command. However, somewhat confusingly, at the command prompt, pip3 is referred to merely as pip
. The command structure is further complicated by calling pip from Python3:
python3 -m pip install PACKAGE
The package can be defined by a local path, or the version control or Python repository. An exact version can be specified by PACKAGE==VERSION
, while specifying a version and adding <HIGHER-VERSION
or >LOWER-VERSION
specifies a range of installation candidates. In addition, ~=VERSION
specifies an installation candidate compatible with a certain version.
Almost alone among the other installation choices, this syntax is more complicated than that of other package managers discussed here. However, it is included, because, as its use of Debian syntax implies, pip seems designed as an improvement over traditional package management. Its syntax makes pip an installer for experts, providing them with advanced tools.
Cloning from Servers
An increasingly common installation method is to copy the files from a version control repository. The most common command for this purpose is git
, using the command git clone URL
(Figure 5), but curl
and wget
are also occasionally used. With all three commands, several scenarios are possible. You might copy only source code and find installation instructions in a README file. If the application is written in an interpreted language like Python, the copied files are ready for use. Alternatively, a developer may have included a compiled binary and all the dependencies. In all these cases, you only need to follow the provided instructions, although you may need to install a tool or two before you install.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.