The first Chrome OS netbook
The first Chrome OS netbook
Installing software with Apt-get
APT (Advance Packaging Tool) is a wonderful package management system. It consists of different tools, which names usually begins with “apt-” : apt-get, apt-cache, apt-cdrom, etc. Unlike RPM, which equivalent in a Debian system would probably be DPKG, apt-get handles dependencies resolution and takes care of downloading the software for you (much like YUM in a Red Hat system).
Though apt-get is generally used to install binary packages, it also can build and install source packages (like Gentoo’s emerge). One can further more ease the process of installing software by using Synaptic (Graphical Interface), which is considered more featured APT frontend.
Αptitude is a terminal-based apt frontend with a number of useful features, including: a mutt-like syntax for matching packages in a flexible manner, dselect-like persistence of user actions, the ability to retrieve and display the Debian changelog of most packages, and a command-line mode similar to that of apt-get. One should use aptitude to install meta-packages because aptitude keeps log of all packages that are part of meta-package. Its easy to remove/un-install meta-package in one go with aptitude.
One must have root privileges to execute apt-get or aptitude commands. Execute ‘su’ in Debian and prefix ‘sudo’ in Ubuntu to gain root privileges.
apt-get depends on Debian packages repositories (where are stored both sources and binary packages) that can be configured in the file /etc/apt/sources.list. A typical Debian stable sources.list would look something like this :
deb ftp://ftp.us.debian.org/debian/ stable main contrib non-free
deb-src ftp://ftp.us.debian.org/debian/ stable main contrib non-free
deb ftp://ftp.us.debian.org/debian-security/ stable/updates main contrib non-free
deb-src ftp://ftp.us.debian.org/debian-security/ stable/updates main contrib non-free
APT includes a tool called apt-setup, which can be summoned from the command line, to help you configure a proper /etc/apt/sources.list file, optimized for your needs and geographic location.
One can also configure APT to follow the testing or the unstable distribution of Debian.
Once the user has a sources.list adapted to his/her needs, the local list of packages needs to be updated :
Only then can the repositories be browsed with apt-cache.
To search a package from its text description :
apt-cache search <something>
Replace <something> with an application name or word. For example,
apt-cache search irc client
will display a list of several irc clients.
To know more about a package and its description (dependencies, functionnalities, maintainer’s identity, etc.) :
apt-cache show <package_name>
In this case you have to replace <package_name> with the exact package name.
Installating a binary package is done in one single step :
apt-get install <package_name>
Another neat feature of apt-get : it allows to build and install a source package. Minimally, two steps are needed in order to do that. First install the package dependencies :
apt-get build-dep <package_name>
Secondly tell apt-get to build and install the package itself :
apt-get source -b <package_name>
For example, installing the email client “pine” can be done like that :
apt-get build-dep pine
apt-get source -b pine
Uninstalling a package is done like this :
apt-get remove <package_name>
Or if you wish to remove the package along with all of its configuration files (essentially doing a clean uninstall):
apt-get remove –purge <package_name>
A word of caution : apt-get handles dependencies in a very strict manner. If you try to uninstall a piece of software that other pieces of software depends on, apt-get will also want to uninstall them (not before warning you about the situation).
Further reading : Debian Reference, Chapter 6 – Debian package management
For the impatient : Debian Quick Reference, Chapter 3 – Debian package management
Installing software on Mandrake with urpm
urpm is a nifty was to install software on any 7.x or greater Mandrake system. Some of the advantages of Mandrake’s urpm utilities are:
* It automatically solves package dependencies issues by installing or uninstalling dependent packages.
* It installs packages and dependencies directly from the internet.
* It allows globbing of package names
* It will automatically update your system.
* It will install all those “not allowed to distribute” programs that you really want to have (DVD support, MP3 enoders, etc…)
Originally posted by Jason Lambert