Monday, 18 March 2013

apt-get? yum.

Being used to apt-get (network-auto-install) and dpkg (install downloaded packages) in linux mint, I found counterparts in centOS:

apt-get = yum
dpkg = rpm

Some useful yum commands:

yum search <something> - searches for a package. Can use partial name, and it's case insensitive.
yum install <something> - installs a package and its dependencies. Can use -y to skip the "install? y/n", but that isn't always a good idea, for example I once uninstalled X and gnome automagically this way.
yum whatprovides <some missing system file> - Looks for packages that provide a specific file; for example I found that "yum whatprovides libQtGui.so.4" was in qt-x11, needed for VirtualBox to run.

Some useful rpm commands:

rpm -ivh <something> - install an rpm package.
rpm -e <something> - remove an installed program.

A NOT so useful rpm command:

rpm --force <something> - force the install of some package. This made me suffer a lot, uninstall X & gnome, causing incompatibilities and broke yum. Time to repeat an advice given on irc: "Don't use --force. Yum doesn't have that function, and for a reason."

No comments:

Post a Comment