Error
-------------------
This system is not registered with an entitlement server. You can use subscription-manager to register. # vim /etc/yum/pluginconf.d/subscription-manager.confenabled=0
yum clean all
Package reconfigure-0.1.81-1.noarch.rpm is not signed
wget http://realrepo.ajenti.org:8888/ng/centos/6/x86_64/reconfigure-0.1.81-1.noarch.rpm
rpm -ivh reconfigure-0.1.81-1.noarch.rpm
or
yum -y install http://realrepo.ajenti.org:8888/ng/centos/6/x86_64/reconfigure-0.1.81-1.noarch.rpm
yum clean all
yum -y update
Warning: RPMDB altered outside of yum.
yum history sync
yum history new
yum clean all
yum clean metadata
Yum. Error with rpmdb
yum clean
rm -f /var/lib/rpm/__db*
rpm --rebuilddb
update fails, duplicated packages
yum-complete-transaction
package-cleanup --dupes # lists duplicate packages
package-cleanup --cleandupes # removes duplicate packages
To find and delete dup packages (one line):
sudo sh -c 'for file in `rpm -qa --queryformat="%{NAME} %{ARCH}\n" | sort | uniq -c | grep -v " 1 " | cut -c 9- | cut -d" " -f1`; do rpm -q --last $file | head -1 | cut -d" " -f1; done | grep -v kernel | grep -v gpg-pubkey | xargs rpm -e --justdb --nodeps'
yum-complete-transaction
package-cleanup --problems
package-cleanup --dupes
package-cleanup --cleandupes
rpm -Va --nofiles --nodigest
yum clean all
rpm --rebuilddb
yum update
yum update or yum install fails with package conflict between 64 bit and 32 bit package architectures
yum install yum-utils
The package-cleanup --dupes lists all duplicate packages:
# package-cleanup --dupes
The package-cleanup --cleandupes removes the duplicates (it asks for a confirmation to remove all duplicates unless the -y switch is given):
# package-cleanup --cleandupes
Edit /etc/yum.conf, set the following line for Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6:
exactarch=1
Edit /etc/yum.conf, set the following line for Red Hat Enterprise Linux 7:
exactarchlist=*
Run yum command:
# yum clean all
# yum update
------------------------x-------------------------------
[root@mail ~]# yum reinstall yum
rpmdb: Thread/process 29719/140504333125536 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed
# mkdir /var/lib/rpm/backup
cp -a /var/lib/rpm/__db* /var/lib/rpm/backup/
rm -f /var/lib/rpm/__db.[0-9][0-9]*
rpm --quiet -qa
rpm --rebuilddb
yum clean all
-----------XXX------------------
yum-complete-transaction
package-cleanup --problems
package-cleanup --dupes
package-cleanup --cleandupes
rpm -Va --nofiles --nodigest
yum clean all
rpm --rebuilddb
yum update
find the actual command(s) in that thread. To see the duplicates packages:
sudo sh -c 'for file in `rpm -qa --queryformat="%{NAME} %{ARCH}\n" | sort | uniq -c | grep -v " 1 " | cut -c 9- | cut -d" " -f1`; do rpm -q --last $file | head -1 | cut -d" " -f1; done | grep -v kernel | grep -v gpg-pubkey | xargs rpm -e --justdb --nodeps'
RPM - 5.x Server
http://vault.centos.org/5.8/os/x86_64/CentOS/
/5.9/os/x86_64/CentOS/
/5.10/os/x86_64/CentOS/
/5.11/os/x86_64/CentOS/
centos 5.11 removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
CentOS 5 fails: RepoError: Cannot find a valid baseurl for repo: base
Open the file /etc/yum.repos.d/CentOS-Base.repo in any editor and comment baseurl and mirrorlist directives in each enabled section.
Add a new baseurl directive with an appropriate link for each enabled section as shown below:
# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.BK
# vi /etc/yum.repos.d/CentOS-Base.repo
yum clean all
yum clean metadata
yum -y update
# yum install centos-release-cr
# yum update
# yum-config-manager --enable cr
# yum repolist cr
yum install xrdp --enablerepo=cr
Error: Rpmdb changed underneath
yum Error:rpmdb open failed
resolve RPMdb error while update the yum
1) Check the running and holding processes of rpm database
ps -aufx | grep /var/lib/rpm
2)Delete the temporary DB files:
rm -fv /var/lib/rpm/__*
3) Rebuild your server RPM database using the below command:
rpm --rebuilddb -v -v
rm -fr /var/cache/yum/*
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://vault.centos.org/5.11/os/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://vault.centos.org/5.11/updates/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://vault.centos.org/5.11/extras/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
...
OR
Change your: vi /etc/yum.repos.d/CentOS-Vault.repo
accordingly:
Code:
# TEMPORARY CENT5 EOL REPO # WARNING CENT 5 IS EOL UPGRADES SHOULD BE PERFORMED IMMEDIATELY [C5.11-base] name=CentOS-5.11 - Base baseurl=http://vault.centos.org/5.11/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 enabled=1 [C5.11-updates] name=CentOS-5.11 - Updates baseurl=http://vault.centos.org/5.11/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 enabled=1 [C5.11-extras] name=CentOS-5.11 - Extras baseurl=http://vault.centos.org/5.11/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 enabled=1 [C5.11-centosplus] name=CentOS-5.11 - Plus baseurl=http://vault.centos.org/5.11/centosplus/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 enabled=0
After that, do:
yum clean all
yum update
[root@servername ~]# yum clean all
[root@servername ~]# yum -y update
__________________________________________________________________________________
------------