[root@mysql-slave src]# yum clean all
error: db3 error(22) from dbenv->open: 无效的参数error: cannot open Packages index using db3 - 无效的参数 (22)error: cannot open Packages database in /var/lib/rpmCRITICAL:yum.main:Error: rpmdb open failed
[root@mysql-slave src]# cd /var/lib/rpm/[root@mysql-slave rpm]# lsBasenames __db.001 __db.003 Dirnames Group Name Packages Provideversion Requirename Sha1header TriggernameConflictname __db.002 __db.004 Filedigests Installtid Obsoletename Providename Pubkeys Requireversion Sigmd5
解决办法如下
[root@mysql-slave rpm]# rm -f __db.00*
[root@mysql-slave rpm]# yum clean all已加载插件:fastestmirrorCleaning repos: base extras updates清理一切Cleaning up list of fastest mirrors[root@mysql-slave rpm]# yum repolist已加载插件:fastestmirrorDetermining fastest mirrors * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.combase | 3.7 kB 00:00 base/primary_db | 4.7 MB 00:03 extras | 3.4 kB 00:00 extras/primary_db | 30 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 7.0 MB 00:06 仓库标识 仓库名称 状态base CentOS-6 - Base 6,706extras CentOS-6 - Extras 53updates CentOS-6 - Updates 1,175repolist: 7,934