Friday, February 7, 2014

Installing Packages



Installing Packages


Most Linux distributions use either the Debian package format (DEB) or Red Hat Package Manager (RPM). As already evident by the package format name, DEB is used on Debian-based distributions such as Ubuntu and Knoppix, while RPM is used on Red Hat Linux-based distributions such as Fedora and openSUSE.

To install a Debian package:
# dpkg -i packagename.deb

To install an RPM package:
# rpm -i packagename.rpm

While the dpkg and rpm commands look pretty straightforward, they are very diffi cult to use practically because of dependency. Each RPM/ DEB package is always dependent on some other RPM/DEB package; if you do not have the required package in the exact version number, the install will not succeed. So in order to install one package, you have to hunt down the package it depends on, then install it. By the way, you will also have hunt down the dependent
packages for the packages your original package depends on. To work around this issue, Linux distributions have created high-level package managers which automatically download the packages and resolve all of the dependencies. The only problem with this approach is it’s not standard across all distros.


On Fedora/Red Hat you can use
Yellowdog Updater, Modifi ed (YUM):
# yum install <packagename>
Note: YUM can also be installed on other
distributions such as Ubuntu and openSUSE.


On Debian/Ubuntu you can use
Advanced Packaging Tool (Apt):
# apt-get install <packagename>


On openSUSE you can use ZYpp:
# zypper install <packageName>

No comments:

Post a Comment