The preferred method of installing programs is via the package managers described in this chapter. However, although the Ubuntu package archives are very large, it is possible that you may wish to install a package that is not available in the Ubuntu archives. If this happens, you can also download and install files from websites.
It is important to ensure that any files you download come from a safe source before installing them.
There are many different kinds of Linux package
files. Most of these are associated with the package
managers of specific Linux distributions. Examples are
Debian Package files (.deb
files),
RPM Package Manager files
(.rpm
files),
Tarballs (.tar
files) and .run
files.
This section deals with installing these single files.
It is not guaranteed that these files will be compatible with your system and you will not receive security updates if you install these files. For these reasons, if you wish to install a program, always use a native Ubuntu package of the application available through a package manager, if there is one available. |
These files are Debian packages. The
package files associated with Ubuntu have the .deb
suffix because of Ubuntu's
close relations with the Debian GNU/Linux distribution. You
will need administrative privileges to install a .deb
file. See Administrative Tasks for
more details.
To install a .deb
file, double-click on it. If you prefer using the Terminal, enter:
sudo dpkg -i package_file.deb
You can use your package manager to uninstall a
.deb
file once it has been installed.
Alternatively, enter the following in a Terminal:
sudo dpkg -r package_name
Another type of package is the Red Hat Package
Manager (RPM) file. These have the
.rpm
suffix. It is not recommended to
install these on an Ubuntu system. In almost all cases, a
native Ubuntu .deb
package is
available. However, if absolutely necessary, an
.rpm
file can be converted to a
.deb
package using the
alien application. The resulting
.deb
file can be installed as
described above.
To convert an RPM into a .deb
:
-
Install the alien package.
-
In a Terminal, enter:
sudo alien
package_file.rpm
Files with the .tar
,
.tgz
, .tar.gz
or .tar.bz2
suffix are package files
known as tarballs, and are widely used in Linux and Unix to
package software. Tarballs can also be used to archive and compress other files.
If there is no native Ubuntu package available in any of the Ubuntu repositories, you can use the command line to install or uninstall the tarball file.
The first step will be to uncompress and extract the tarball. If it is a .tgz or a .tar.gz, in a Terminal enter:
tar xfvz tarball_name
Then it will be necessary to follow the instructions that come
with the package. These are generally located in the extracted
tarball in a file called README
or
INSTALL
.
Tarballs often contain the source code of the program, and need to be compiled in order to be used.
Compiling programs requires some packages that are not installed by default. You can install most of these all at once by installing the build-essential package. |
Sometimes you may need to install software (most often a game) which has been packaged as a .run file. These files contain the software and a small program to install the software.
Follow the procedure
below to install software
packaged in a .run
file:
-
Find the
.run
file in the File Browser -
Right-click the file and select Properties
-
Under the Permissions tab, make sure that Allow executing file as program is checked and press
-
Double-click the
.run
file and press to run the installer -
A Terminal window will open. Follow any instructions on-screen to install the program
Once you have started the installer, it may take a while to display an installation screen. This is normally due to the installer extracting all of the files from the .run file ready for use. |