Yum

From My Wiki
Revision as of 00:39, December 8, 2022 by J-Admin (talk | contribs) (Troubleshooting: removed test edit section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Basic Usage

Documentation: http://yum.baseurl.org/wiki/Guides

Log: /var/log/yum.log

See if a package installed, or which version is available:

yum list $package

Search for a package:

yum search $package

Install a package:

yum install $package

Update a package:

yum update $package

Downgrade a package:

yum downgrade $package

Remove a package:

yum remove $package

Search for a file within a package:

yum provides */$package

View package dependencies:

yum deplist $package

View package details:

yum info $package

View installed repos:

yum repolist

Troubleshooting

Errno 4 IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror.

Check /etc/resolv.conf. Make sure settings are correct.

rpmdb problems

Can often happen when the system is very low on RAM.

Make a backup:

mkdir /home/temp/rpmdb-bak/
cp -av /var/lib/rpm/__db* /home/temp/rpmdb-bak/

Remove the database:

rm -i /var/lib/rpm/__db*

Rebuild the database:

rpm --rebuilddb

Check:

yum repolist