Some of the contents here are "Progeny Debian" specific. Especially:
Be warned.
Software in Debian is usually arranged in packages: collections of programs, scripts, and help files. If a program requires a library or other program not on your machine, the package offers to install these other files - or dependencies - for you.
You can install software in Debian in several ways:
Many third party installers are graphical, and easy to use. However, they vary so widely that discussing any of them is beyond the scope of this manual.
[Note]
No matter what method you use, in almost every case, you must be logged in as root user to install or remove software.
A Linux packages is an archive of files for installing software easily. Each package contains a program and the scripts needed to install, configure, and remove it. In most cases, it also includes the on-line help files.
Linux has two main package systems:
You can sometimes use an .rpm package on a Debian system, or a .deb package on a Red Hat-based system.
However, because of differeces in file locations and other problems, this practice is not recommended. Depending on the package, you could even cripple an essential part of the operating system.
Instead, try a conversion tool such as alien . However, these conversion programs do not always work, either.
If all else fails, a static tar file should generally install without trouble.
Debian packages are available from a Debian cd , or from www.debian.org. Static tar files are available from the web sites for specific projects or program maintainers.
[Note]
Progeny Linux Systems cannot guarantee that a package designed for a Debian-based distribution can work with Debian.
Debian offers several tools for package management, including:
Other tools available include dselect and capt, two text-based interfaces. However, because new users often find these tools confusing, they are only mentioned here without any further documentation.
All these tools work with a list of sources. These sources may be cd s or internet sites. Packages are transferred from a source to your hard drive. They can then be installed, either immediately or later.
Once you know something about the structure of Debian packages, you can use these tools quickly and easily.
Before installing, removing, or upgrading software, you may want to learn more about:
[Note]
If this information seems too overwhelming just now, you can skip this section, especially if you are using Progeny's gnome apt-pkgset tool. However, refer back to this section if you are ready to know more than the basics.
Debian package management uses very specific terms to describe what is done with a package:
Packages contain a wealth of information. You can install a program without reading this information, but, reading it often saves you wasted effort.
For example, you generally do not want to install a package that conflicts with another, or to start the installation of a package whose installed size is greater than the free space on your hard disk.
This section explains:
Debian packages are either binary or source. A binary package contains a compiled program that can be run after installation. A source package must be compiled before it can be installed.
A Debian binary package contains:
[Note]
Look at the control file for basic information about the package before you install it.
Depending on the tools, you may just need the program name to install or remove it. In other cases, however, you need the entire package name.
Debian packages have a consistent naming convention:
program_version-revision_processor .deb
In other words, the name consists of:
[Note]
Debian packages are named in the same way as a standard Debian package.
A package's priority is listed in the control file. The priority describes how important it is to the operating system:
A package's dependencies are listed in the control file. The dependencies describe how a package interacts with other packages or programming libraries:
Important files for package management are:
As you use the package management tools, a package may be in several different states:
As you decide what to do with a package, it can be in one of several states. You can view the selection state using the dpkg command:
Packages may be flagged with two options. You can view package flags using the dpkg command:
This section is Progeny specific and does not apply for the standard Debian system. Rewrite desirable.
Debian simplifies package selection by grouping commonly-used related packages into sets. If a program requires more than one package, you can install all the packages at the same time using Progeny's gnome-apt-pkgset utility.
Alternately, you can double-click on the package set and select individual packages from it.
As the name indicates, gnome-apt-pkgset is based on the apt utility. It is also the tool that you use during installation to select software. It includes much of the functionality of apt , and uses the same commands.
Experienced users may find gnome-apt-pkgset limiting and prefer to use apt .
See Installing and Removing Packages With the apt-get Command, Section 11.7.
[Note]
For a list of package sets, see /usr/share/package-sets.
Each package set includes a file with an extension of .contents , which lists the packages in the set, and a file with an extension of
[Note]
Currently, package sets are supported only by Debian cd s or download sites. You cannot use gnome-apt-pkgset with an ordinary Debian source.
img/packages-2.png
The window consists of four sections:
[Note]
A package set may be selected regardless of whether it is installed or not. However, all you would want to do with an uninstalled package set is install it.
This section is Progeny specific and does not apply for the standard Debian system. Rewrite desirable.
Debian simplifies package selection by grouping related packages into sets. If a program requires more than one package, you can install all the packages at the same time using Progeny's apt-pkgset utility.
As the name implies, apt-pkgset is the command line version of gnome apt-pkgset , Progeny's desktop tool.
Both are based on the apt utility. Both include much of the functionality of apt , and works in much the same way. For example, like apt, both depend on a sources list.
However, experienced users may find apt-pkgset limiting and prefer to use apt . See Installing and Removing Packages With the apt-get Command, Section 11.7.
Type: apt-pkgset command packageset .
No hyphen is placed in front of a command.
[Note]
For a list of package sets, see /usr/share/package-sets. Each package set includes a file with an extension of .contents , which lists the packages in the set, and a file with an extension of .description , which displays in gnome-apt-pkgset .
The apt-pkgset Command (Progeny specific) +-------------------------------------------------------------------+ |Command| Action | |-------+-----------------------------------------------------------| |install|Adds the package set to your system. | |-------+-----------------------------------------------------------| |remove |Removes the package set from your system. | |-------+-----------------------------------------------------------| |status |Reports on the package set's status. | |-------+-----------------------------------------------------------| |purge |Removes the package set from your system and all files and | | |associated with it. | +-------------------------------------------------------------------+
The apt-get ("A Package Tool" or "Advanced Package Tool") utility is widely considered one of the most sophisticated package tools available. Although still in development, apt-get can reliably upgrade your system over the internet or upgrade all packages on your system in a single operation.
The apt-get command can run from the command line, or be selected as a source in dselect , the old text-based package management tool in Debian.
The apt-get utility is not so much a command, but a collection of commands. This fact is reflected in its format, which can include not only options, but a specific command as well.
Type: apt-get options command package_name .
The most commonly used options are:
Note that:
The apt-get Command (Manage Packages): Options +---------------------------------------------------------------+ | Option | Action | Comment | |--------------------+-----------------+------------------------| | * -b |Compiles source | | | * --compile |packages after | | | * --build |they are | | | |downloaded. | | |--------------------+-----------------+------------------------| | |Downloads |The option for the | | * -d |packages, but |configuration file is: | | * --download-only |does not unpack |apt::Get:: Download-only| | |them. | | |--------------------+-----------------+------------------------| | * -f |Adds missing |The option for the | | * --fix-broken |dependencies. |configuration file is: | | | |apt::Get: :Fix-Broken | |--------------------+-----------------+------------------------| | | |No prompts for actions | | | |are given. | | | | | | | |In some cases, this | | * --force-yes |Forces an action.|option could make your | | | |system unusable. | | | | | | | |The option for the | | | |configuration file is: | | | |apt::Get: :force-yes. | |--------------------+-----------------+------------------------| | | |Use with the | | | |dist-upgrade command for| | |Ignores hold |efficiency. | |--ignore-hold |flags on a | | | |package. |The option for the | | | |configuration file is: | | | |apt::Get: :ignore-hold. | |--------------------+-----------------+------------------------| | * -m |Ignores missing |Do not use with -f or | | * --ignore-missing|or corrupted |--fix-broken . | | * --fix-missing |packages. | | |--------------------+-----------------+------------------------| | | |Only packages already | | * --no-download |Prevents |downloaded are affected | | |downloading. |by other commands or | | | |options. | |--------------------+-----------------+------------------------| | |To prevent the |The option for the | |--no-upgrade |upgrading of |configuration file is: | | |packages |apt::Get: :no-upgrade. | |--------------------+-----------------+------------------------| | |Displays a list |The option for the | | * -u |of all packages |configuration file is: | | * --show-upgraded |to be upgraded. |apt::Get: : | | | |Show-Upgraded. | |--------------------+-----------------+------------------------| | | |The option for the | | * -y |Automatically |configuration file is: | | * --yes |replies "yes" to |apt::Get: :Assume-Yes. | | * --assume-yes |all prompts. | | | | |If an error occurs, then| | | |apt-get stops. | +---------------------------------------------------------------+
The apt-get Command (Manage Packages): Commands +---------------------------------------------------------------+ | Option | Action | Option | |------------+----------------------------+---------------------| | |Removes package files that | | | |can no longer be downloaded | | |autoclean |from the sources. | | | | | | | | | | |------------+----------------------------+---------------------| | |Updates listings of packages| | |check |and check for broken | | | |packages. | | |------------+----------------------------+---------------------| |clean |Clear the local listings of | | | |retrieved package files. | | |------------+----------------------------+---------------------| | |Installs the latest versions| | |dist-upgrade|of all packages currently | | | |installed, as well as any | | | |necessary dependencies. | | |------------+----------------------------+---------------------| |install | |Enter only the | |package |Installs packages. |package name, not the| | | |full file name. | |------------+----------------------------+---------------------| |remove | |Enter only the | |package |Removes packages. |package name, not the| | | |full file name. | |------------+----------------------------+---------------------| | | |Use the --compile | | | |option to convert the| | | |source packages to | |source |Finds and downloads source |binary packages. | |package |packages | | | | |Use the | | | |--download-only | | | |option to download, | | | |but not unpack. | |------------+----------------------------+---------------------| |source |Updates package overview | | |package |files with information from | | | |the source. | | |------------+----------------------------+---------------------| | |Installs the latest versions|Run the update | |upgrade |of all packages currently |command first to | | |installed. |ensure that you have | | | |the latest sources. | +---------------------------------------------------------------+
Source lists are essential to the use of apt-get . Without at least one valid source, apt-get is not usable.
[Note]
When installing, apt tries the sources in the order that they are listed in the file.
You can edit sources in at least three ways:
[Note]
apt-setup removes all comments from /etc/apt/sources.list.
Type: apt-cdrom options command.
Currently, the only command available is add .
This utility maintains the database of cd s in /var/state/apt/ cdroms.list.
Options can be entered as part of the command or set in /etc/apt/ apt.conf.
Options set in the configuration file can be overridden from the command line by using the option - option =no .d
[Note]
You can also use the apt-set command to set a cd source.
The apt-cdrom Command (Sets Sources) +-------------------------------------------------------------------+ | Option | Action | Comment | |-------------+---------------------+-------------------------------| | * -a |Scan for packages. |May not be needed for all cd s.| | * --through| | | |-------------+---------------------+-------------------------------| | | |The mount point must be listed | | | |in /etc/fstab. | | * -d |Sets the cd mount | | | * --cdrom |point. |The equivalent option in the | | | |configuration file is: | | | | | | | |Acquire:: cd ::mount | |-------------+---------------------+-------------------------------| | |Copies files to your |The equivalent option in the | | * -f |system without |configuration file is: | | * --fast |checking them. | | | | |APT:: cd ::Fast | |-------------+---------------------+-------------------------------| | | |The configuration file is /etc/| | |Edits an option in |apt/apt.conf. | |-o group tool|the configuration | | |= option |file. |See the configuration file and | | | |on-line help for information | | | |about options. | |-------------+---------------------+-------------------------------| | |Over rides a setting |The configuration file is /etc/| |- option = no|in the configuration |apt/apt.conf. | | |file. | | |-------------+---------------------+-------------------------------| | * -r |Gives a cd a new |You are prompted for the new | | * --rename |label. |label. | +-------------------------------------------------------------------+
The dpkg command is used for general package management. It includes many of the functions of dpkg-deb , a tool for managing and building Debian packages, and is usually used in preference to it.
Although dpkg can be used to install a package, on the whole it is less powerful and less convenient than apt-get .
For ordinary user, the real strength of dpkg is its ability to retrieve information about packages on their systems. It is especially useful if you need to search packages or their contents.
For more advanced users, dpkg is also useful for building Debian packages.
For information about building packages, see the on-line help for dpkg and dpkg-deb .
Type: dpkg options argument action package .
Depending on the option, the package may be identified by its file name or by the name of the package.
+-------------------------------------------------------------------+ | Options | Action | Comments | |-----------------------+-----------------------+-------------------| | |Automatically | | | * - B |deconfigures any | | | * --auto-deconfigure |dependent packages when| | | |a package is removed. | | |-----------------------+-----------------------+-------------------| | |Does not install the | | | * -E |package if the current | | | * --skip-same-version|version is already | | | |installed. | | |-----------------------+-----------------------+-------------------| | |Includes any packages |Use with the -A , | | * -R |in the subdirectories |--install , | | * --recursive |listed in the action. |--unpack or -avail | | | |actions. | |-----------------------+-----------------------+-------------------| | | |A warning displays,| | | |but the command | | | |continues to be | | |Forces the command to |processed. | | * --force argument |complete even though a | | | |problem occurs. |See The dpkg | | | |Command (Package | | | |Management): | | | |Argument. (***) | |-----------------------+-----------------------+-------------------| | | |The command stops | | | |with an error | | |Stops the command from |message. | | * --no-force argument|completing if a problem| | | * --refuse argument |occurs. |See The dpkg | | | |Command (Package | | | |Management): | | | |Argument. (***) | +-------------------------------------------------------------------+
***) See The dpkg Command (Package Management): Argument, Section 11.9.2.
+-------------------------------------------------------------------+ | Argument | Action | |----------------+--------------------------------------------------| |auto-select |Selects or de-selects packages to install or | | |remove. | |----------------+--------------------------------------------------| |configure-any |If necessary, configures any unconfigured packages| | |that the package depends on. | |----------------+--------------------------------------------------| | |Installs even if the package conflicts with | |conflicts |another one. This option could cause some files to| | |be over-written. | |----------------+--------------------------------------------------| |depends |Warns about dependency problems display, but do | | |not stop the command. | |----------------+--------------------------------------------------| |depends-version |Warngs about version problems display. | |----------------+--------------------------------------------------| |downgrade |Installs even if a newer version is already | | |installed. | |----------------+--------------------------------------------------| |hold |Processes packages with a hold flag. | |----------------+--------------------------------------------------| |overwrite |Over writes a file from one package with the same | | |file from another package. | |----------------+--------------------------------------------------| |remove-reinstreq|Removes broken packages. | +-------------------------------------------------------------------+
+-------------------------------------------------------------------+ | Actions | Action | Comments | |------------------+------------------+-----------------------------| | * -A |Updates package | | | * --record-avail|information on | | | |your system. | | |------------------+------------------+-----------------------------| | * -C |Searches for |If possible, what is missing | | * --audit |partly installed |is explained. | | |packages. | | |------------------+------------------+-----------------------------| | * -c package |Displays files in | | | * --control |a Debian package. | | | package | | | |------------------+------------------+-----------------------------| | | |Note that the package names, | | | |not the package files are | | | |entered. | |--configure |Configures an | | |packages |unpacked package. |Instead of listing packages, | | | |you can use -a or --pending | | | |to configure all unpacked | | | |packages. | |------------------+------------------+-----------------------------| | * -e package |Extracts control | | | directory |information into | | | * -- control |the directory | | | package |specified. | | | directory | | | |------------------+------------------+-----------------------------| |- -get-selections |Displays package |If no string is given, all | |string |selections. |selected packages display. | |------------------+------------------+-----------------------------| | * -X package | | | | directory |Extracts files |Useful for examining a | | * --extract |from the package |package's contents. | | package |into a directory. | | | directory | | | |------------------+------------------+-----------------------------| | | |To install all packages in a | | * -i package | |directory, use this options | | name |Installs a |with -R or --recursive and, | | * --install |package. |complete with a directory | | package file | |name instead of a single | | | |package name. | |------------------+------------------+-----------------------------| | * -l string |Lists packages |If no pattern is listed, all | | * --list string |that match the |packages are listed. | | |string. | | |------------------+------------------+-----------------------------| | * -L package |Lists files that | | | * --listfiles |come from a | | | package |particular | | | |package. | | |------------------+------------------+-----------------------------| | | |Note that the package names, | | | |not the package files are | |--print-avail |Displays package |entered. | |package |information. | | | | |The information is form /var/| | | |lib/dpkg/available. | |------------------+------------------+-----------------------------| | | |Note that the package names, | | | |not the package files are | | | |entered. | |--purge package |Purges a package. | | | | |Instead of listing packages, | | | |you can use -a or --pending | | | |to configure all packages | | | |marked for purging. | |------------------+------------------+-----------------------------| | | |Note that the package names, | | | |not the package files are | | * -r package | |entered. | | * --remove |Removes a package.| | | package | |Instead of listing packages, | | | |you can use -a or --pending | | | |to remove all packages marked| | | |for removal | |------------------+------------------+-----------------------------| | * -S filename |Searches installed| | | * --search |packages for a | | | filename - |file name | | | pattern | | | |------------------+------------------+-----------------------------| | * -s packages |Display a | | | * --status |package's status. | | | package | | | |------------------+------------------+-----------------------------| | | |To unpack all packages in a | | |Uploads a file, |directory, use this options | | * --unpack |b.ut does not |with -R or --recursive and, | | |configure it |complete with a directory | | | |name instead of a single | | | |package name. | |------------------+------------------+-----------------------------| | * --update-avail|Updates list of | | | * --merge-avail |available files | | |------------------+------------------+-----------------------------| | |Searches for | | | |uninstalled | | |--yet-to-unpack |packages that have| | | |been selected for | | | |installation. | | +-------------------------------------------------------------------+
Linux developers often offer programs as tar files of uncompiled source code instead of in a package format. While a program is in early development, cotinually remaking packages would be a waste of effort, so most programmers do not bother. The source code is, after all, what most programmers are interested in. In many cases, too developers are not working with a specific distribution or package management system in mind.
A tar file of unpackaged software may be listed as being dynamically linked or static.
A dynamically linked piece of software calls on programming libraries as it needs them. This tactic saves space, and is the one most commonly used. However, it has two major drawbacks:
By contrast, static software includes the necessary functions within itself. As a result, it may duplicate existing functions on your hard drive, and take up more space than the same program dynamically linked. However, because it is self-contained, it should not have any dependency problems. For this reason, always install the static version of unpackaged software whenever you have the choice.
Exact instructions vary with each piece of unpackaged software. However, the following instructions give a general overview.
[Note]
Do not use the internet while root user. Doing so makes your system vulnerable to attacks.
These last three steps may take several minutes apiece. In each case, watch the display on the screen for errors. You may have to install a programming library on your system to get past these steps without errors.
At the end of this process, the software should be ready for use. You may want to:
[Note]
The most likely error when installing unpackaged software is a missing dependency. However, because unpackaged software is often in development, it may not work on all systems or with all Linux-based operating systems, especially in the earliest stages of development.
Often, you can make a Debian package from another format using the alien utility. However, because of the complexities of converting from one format to another, alien does not always work.
For this reason, you may prefer to use a static tar file instead. See Installing Unpackaged Software, Section 11.10.
The alien Command (Convert Packages): Formats +---------------------------------------------------------------+ | Format | Action | Comment | |------------+----------------------+---------------------------| | * -d |Converts to or from |This is the default if no | | * --to-deb|Debian format. |target format is mentioned.| |------------+----------------------+---------------------------| | * -r |Converts to or from |The Red Hat utility rpm | | * --to-rpm|Red Hat format. |must be installed. | |------------+----------------------+---------------------------| |--to-slp |Converts to or from | | | |Stampede Linux format.| | |------------+----------------------+---------------------------| | * -t |Converts to or from |Does not work on tarred | | * --to-tgz|Slackware Linux |source code files. | | |format. | | +---------------------------------------------------------------+
The alien Command (Convert Packages): Options +---------------------------------------------------------------+ | Format | Action | Comment | |-------------+---------------------+---------------------------| | * -c |Converts scripts for |Use with caution. Examine | | * --scripts|the package. |scripts before using this | | | |option. | |-------------+---------------------+---------------------------| | * -i |Installs newly |After installation, the | | * --install|generated package |package file is removed. | | |automatically. | | +---------------------------------------------------------------+
User's Guide