This page contains information on how to install additional packages in ALT Workstation system.
Additional software installation
A particular set of software is available when first running ALT Workstation after its installation. The number of preinstalled programs depends either on the set of programs of a particular distribution or on the options chosen by user during the system installation process. If your system does not contain the programs you are interested in, you can install them later from different sources.
Additional software may be located on the installation disk and/or in special software repositories located on the Internet and/or on a local network. Programs placed in these sources have the form of packages prepared for installation.
Using the installation CD
You can use Synaptic Package Manager to install any additional software.
Synaptic Package Manager
Synaptic Package Manager can be found at System → Settings → Synaptic Package Manager (System → Preferences → Other → Package Manager).
To make the search easier, the programs available for installation are divided into groups displayed on the left side of the program window. On the right there is a list of programs with their current status:
- green label — package is already installed;
- white label — package is not installed.
To start the installation, double-click the uninstalled package in the right half of the window and click Apply. If necessary, the package manager will ask you to insert the installation disc.
This information may be useful when installing additional software from external repositories.
Synaptic Package Manager
Synaptic Package Manager can be used to select a repository that is compatible with your distribution. To specify a particular repository, select one of the options in the Settings → Repositories menu and click OK. If in doubt, select the lines containing ftp://ftp.altlinux.org/. You can add any repository to the proposed list by clicking the Create button and entering the required information.
Please note that after selecting and adding repositories, you need to reload information about the packages they contain by running Edit → Reload Package Information. Otherwise, the list of programs available for installation will not be relevant.
The installation process itself from the added repositories is no different from the method described above in the Using the installation CD section.
Advanced package installation
There are many shared resources in modern Linux-based systems: shared libraries that contain standard functions, executables, scripts, standard utilities, etc. These shared resources are being used by several programs. Removing or changing version of one of the system components may cause the other components associated with it or even the entire system to fail. In the context of system administration, this type of problem is referred to as a system integrity violation. The task of the administrator is to ensure that the system has consistent versions of all necessary software components or in other words to ensure the integrity of the system.
To install, uninstall, and update programs, as well as to maintain the integrity of the system in Linux, package managers (such as rpm) were primarily used. For a package manager, software is a set of components called packages. Packages contain a set of executable programs and auxiliary files necessary for correct operation of the software. Package managers make it easy to install programs: they allow you to check the availability of a suitable version of the component required for the installed program at the time of installation. Package managers perform the necessary procedures to register the program in all operating environments of the user: immediately after installation, the program becomes available to the user from the command line and appears, if it was provided, in the application menu of all graphical shells.
Often, components used by different programs are separated into separate packages and are marked so that you need to install package B to work with the desired software provided by package A. In this case, it is said that package A depends on package B or there is a dependency between packages A and B.
Tracking dependencies between packages is an important task for any distribution. Some components of packages can be interchangeable, that is, multiple packages can be found that offer the requested resource.
The task of monitoring the integrity and consistency of the software installed on the system is even more important. Imagine that some programs A and B require the presence of the component C of version 1.0. Version upgrade of package A, which requires the upgrade of component C to a new version (e.g., version 2.0 in which a new access interface is used), leads to a mandatory update of program B.
In practice, package managers have been unable to effectively eliminate system integrity violations and prevent any conflicts when installing or uninstalling programs. This drawback was especially acute for updating systems from a centralized repository in which packages are continuously updated, split into smaller ones, etc. It was this drawback that stimulated the creation of systems for managing software packages and maintaining the integrity of the operating system.
For automation and control of the processes described above, an improved APT (Advanced Packaging Tool) package management system was used. Automation and control are achieved by creating one or more external repositories which store the software packages that are available for installation.
APT has two databases at its disposal: one describing the packages installed on the system and the other describing the external repository. APT monitors the integrity of the system and, in case of contradictions in package dependencies, resolves conflicts and finds ways to correct them by following the information from external repositories.
The APT system consists of several utilities. The most commonly used package management utility is apt-get. It automatically detects dependencies between packages and strictly enforces them in any of the following operations: installing, removing, or updating packages.
Program sources (repositories)
Unlike a simple set of packages, the repositories with which APT works have meta information. This information contains indexes of the packages in the repository and other information about them. Therefore, to get all the information about the repository, it is enough for APT to get its indexes.
APT can be used by any number of repositories simultaneously, forming a single information base about all the packages contained in them. When installing packages, APT only pays attention to the package name, its version, and dependencies. For APT, the location of the package in a particular repository does not matter.
To use several repositories simultaneously, it is necessary to monitor their compatibility with each other, i.e. their package base should reflect one specific stage of development. Sharing repositories from different distributions or mixing a stable repository with an unstable development branch (Sisyphus) can lead to various surprises and difficulties when upgrading packages.
APT interacts with repositories using different access protocols. The most popular are HTTP and FTP.
In order for APT to be able to use a particular repository, the information about it must be placed in the /etc/apt/sources.list file, or in any other .list file (for example, mysources.list) in the /etc/apt/sources.list.d/ directory. Repository descriptions are stored in these files as follows:
rpm [signature] method:path database name
rpm-src [signature] method:path database name
- rpm or rpm-src is the repository type (compiled programs or source code),
- [signature] is an optional string as well as a pointer to the electronic signature of the developers. The presence of this field implies that each package from this repository must be signed with the corresponding electronic signature. Signatures are described in /etc/apt/vendors.list,
- method is the repository access method: ftp, http, file, rsh, ssh, cdrom, copy,
- path is the path to the repository in terms of the selected method,
- database is the relative path to the repository database,
- name is the name of the repository.
APT has a special utility for adding a repository from a CD to sources.list called apt-cdrom. To add a repository entry from a CD, simply insert the disc into the drive and run
apt-cdrom add. After this, the sources.list will have a record of a mapped drive that looks like this:
rpm cdrom:[ALT Educational x86_64]/ ALTLinux main
After the list of repositories in sources.list is edited, you need to update the information about the available packages in the local APT database. This is done with the
apt-get update command.
If there is a repository in sources.list whose contents can be changed (for example, a repository being constantly developed or a repository of security updates), then before working with APT, you need to synchronize the local database with the remote server by using the
apt-get update command. The local database is re-created each time the repository is changed, whether a package in it is added, deleted, or renamed.
When installing a specific package, APT searches for the latest version of this package in all known repositories regardless of how you access them. Thus, if a newer version of the program is found in a repository available on the Internet compared to a CD-ROM, APT will start downloading the corresponding package from the Internet. Therefore, if the Internet connection is not available or is limited by low bandwidth or high cost, you should comment out the lines (by placing the # character at the beginning of the line) related to resources on the Internet in /etc/apt/sources.list.
If you do not know the exact package name, you can use the apt-cache utility to find it. This utility allows you to search for a package not only by its name, but also by its description.
apt-cache search substring command allows you to find all packages whose names or descriptions contain the specified substring. For example:
$ apt-cache search dictionary stardict-wn - GCIDE - The Collaborative International Dictionary of English firefox-ru - Russian (RU) Language Pack for Firefox gnome-dictionary-applet - GNOME panel applet for gnome-dictionary gnome-utils - Utilities for the GNOME 2.0 desktop libgdict - GNOME Dictionary Library. stardict-mueller7 - V.K. Mueller English-Russian Dictionary, 7 Edition: stardict format stardict-slovnyk_be-en - Dictionary: Slovnyk Belarusian-English stardict-slovnyk_be-ru - Dictionary: Slovnyk Belarusian-Russian stardict-slovnyk_be-uk - Dictionary: Slovnyk Belarusian-Ukrainian stardict-slovnyk_cs-ru - Dictionary: Slovnyk Czech-Russian stardict-slovnyk_en-be - Dictionary: Slovnyk English-Belarusian stardict-slovnyk_en-ru - Dictionary: Slovnyk English-Russian stardict-slovnyk_en-uk - Dictionary: Slovnyk English-Ukrainian stardict-slovnyk_es-ru - Dictionary: Slovnyk Spanish-Russian stardict-slovnyk_ru-be - Dictionary: Slovnyk Russian-Belarusian stardict-slovnyk_ru-cs - Dictionary: Slovnyk Russian-Czech stardict-slovnyk_ru-en - Dictionary: Slovnyk Russian-English stardict-slovnyk_ru-es - Dictionary: Slovnyk Russian-Spanish stardict-slovnyk_ru-uk - Dictionary: Slovnyk Russian-Ukrainian stardict-slovnyk_uk-be - Dictionary: Slovnyk Ukrainian-Belarusian stardict-slovnyk_uk-en - Dictionary: Slovnyk Ukrainian-English stardict-slovnyk_uk-ru - Dictionary: Slovnyk Ukrainian-Russian words - A dictionary of English words for the /usr/share/dict directory
apt-cache show command to learn more about the package found and get a detailed description of it:
$ apt-cache show stardict-mueller7 Package: stardict-mueller7 Section: Text tools Installed Size: 3095255 Maintainer: Anton V. Boyarshinov <firstname.lastname@example.org> Version: 1.0-alt7 Pre-Depends: rpmlib(PayloadIsLzma) Depends: stardict (>= 2.4.2) Provides: stardict-mueller7 (= 1.0-alt7) Architecture: noarch Size: 3135276 MD5Sum: ea95c67ca323350b454fbc26533c3548 Filename: stardict-mueller7-1.0-alt7.noarch.rpm Description: V.K. Mueller English-Russian Dictionary, 7 Edition: stardict format Electronic version of V.K. Mueller English-Russian Dictionary, 7 Edition in stardict format. You can use it with stardict client.
Installing/updating a package
Installing a package with APT is done with the command
# apt-get install package_name
Please note that, firstly, administrator privileges are required to install packages, and secondly, before installing and updating packages, you must run the update package indexes command:
# apt-get update
apt-get allows you to install packages on your system that require other packages not yet installed. In this case, it determines which packages need to be installed. apt-get then installs them using all available repositories.
Installing the stardict-mueller7 package with
apt-get install stardict-mueller7 command will result in the following dialog with APT:
# apt-get install stardict-mueller7 Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: stardict-mueller7 0 upgraded, 1 newly installed, 0 removed and 0 not upgraded. Need to get 0B/3135kB of archives. After unpacking 3095kB of additional disk space will be used. Committing changes... Preparing... ####################### [100%] 1: stardict-mueller7 ####################### [100%] Running /usr/lib/rpm/posttrans-filetriggers Done.
apt-get install package_name
is also used to update an already installed package or group of packages. In this case, apt-get additionally checks if there is an updated version of the package in the repository in comparison with the one installed on the system.
With APT you can also install a separate rpm package that is not a part of the repositories (for example, received from the Internet). To do this, just run the command
apt-get install /path/to/file.rpm
Meanwhile, APT will perform a standard procedure for checking dependencies and conflicts with already installed packages.
Sometimes, package operations without using APT break the integrity of the system and apt-get refuses to perform installation, removal, or upgrade operations. In this case, you must repeat the operation by specifying the
-f option that causes apt-get to fix broken dependencies or to remove or replace conflicting packages. You should carefully monitor the messages displayed by apt-get when using this option. Any action in this mode must be confirmed by the user.
Removing a package
Please note that administrator privileges are required to remove packages.
apt-get remove package_name command to remove a package. In order to not violate the integrity of the system, all packages that depend on the removed one will also be removed. If you remove a package that belongs to the basic system components, apt-get will require additional confirmation to prevent a possible accidental error.
When attempting to use apt-get to remove a basic system component, you will be prompted to confirm the operation:
# apt-get remove filesystem Reading Package Lists... Done Building Dependency Tree... Done The following packages will be REMOVED: ... WARNING: The following essential packages will be removed This should NOT be done unless you know exactly what you are doing! ... 0 upgraded, 0 newly installed, 2648 removed and 0 not upgraded. Need to get 0B of archives. After unpacking 8994MB disk space will be freed. You are about to do something potentially harmful To continue type in the phrase 'Yes, do as I say!'
Each situation in which APT issues such a request must be considered separately. There is a very high probability that after executing such a command the system will become inoperable.
Updating all installed packages
To update all installed packages, the following commands must be executed:
# apt-get update # apt-get dist-upgrade
The first command (
apt-get update) will update package indexes. The second one (
apt-get dist-upgrade) allows you to update only those installed packages for which there are newer versions in the repositories listed in /etc/apt/sources.list.
In case of upgrading the whole distribution, APT will conduct a comparison of the system with the repository, remove obsolete packages, install new versions of the packages presented on the system, keep track of situations with renaming of the packages or changing the dependencies between the old and new versions of programs. Everything that needs to be installed (or removed) in addition to that already presented in the system will be specified in the apt-get report with which APT will precede the update itself.
apt-get dist-upgrade command will update the system, but not the system kernel.
To update the system kernel, run the following command:
If the indexes have not been updated for more than a day, make sure to run
apt-get update prior to running the
update-kernel command also updates the kernel modules if any of them have been updated in the repository without updating the kernel.
The new kernel will boot only after the system is rebooted.