Tuesday, October 11, 2011

How to install a software in Ubuntu

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.
[Warning]
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.

Installing/uninstalling .deb files

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

Converting .rpm files to .deb files

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:
  1. Install the alien package.
  2. In a Terminal, enter:
    sudo alien package_file.rpm

Installing tarballs

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.
[Note]
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.

Install .run packages

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:
  1. Find the .run file in the File Browser
  2. Right-click the file and select Properties
  3. Under the Permissions tab, make sure that Allow executing file as program is checked and press Close
  4. Double-click the .run file and press Run in Terminal to run the installer
  5. A Terminal window will open. Follow any instructions on-screen to install the program
[Note]
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.

Friday, October 7, 2011