centos使用yum安装软件报错:rpmdb: BDB0113 Thread/process 4675/140158383585344 failed: BDB1507 Thread died in

完整报错如下:

[root@0002 yum.repos.d]# yum -y install dos2unix
error: rpmdb: BDB0113 Thread/process 4675/140158383585344 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
[root@0002 yum.repos.d]# yum clean all
error: rpmdb: BDB0113 Thread/process 4675/140158383585344 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

解决办法如下:

vi /etc/yum.conf
plugins = 0  	# plugins修改为0
vi /etc/yum/pluginconf.d/fastestmirror.conf
enable 0		# 将enable修改为0
[root@0002 flink-1.17.1]# yum -y install dos2unix
Package dos2unix-6.0.3-7.el7.x86_64 already installed and latest version
Nothing to do

如果以上还不行,参考如下链接:

https://blog.csdn.net/qq_39689711/article/details/118093648

你可能感兴趣的:(linux基础,centos,linux,运维)