I need to install a package that is missing in my virtual machine that is running Red Hat. How do I do that?
What command should I use to install/remove/upgrade .rpm packages?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
EDIT: As recommended in a comment below, you can just use
yum for everything and you will be fine.
Check Red Hat's documentation for the
rpm -Uvh package_file.rpminstalls/upgrades a package from a .rpm file
rpm -e package_nameremoves a package
To install packages from Red Hat's repositories, use
yum, whose commands are mostly self-explanatory (
update etc...). This documentation is for CentOS 5, but I think it should work for newer versions of Red Hat/CentOS.
apropos install leads to the rights track.
If "apropos" does not return anything, you have to run
After that you will find almost anything with "apropos" which will do a full-text-search of all man-page-short-descriptions.
yum, as opposed to rpm, will resolve all dependencies needed.
rpm -ivh abcd.rpm
rpm -Uvh abcdef.rpm
rpm -e abcd.rpm
or remove the the rpm without deps
rpm -e --nodeps abcd.rpm