侧边栏壁纸
  • 累计撰写 176 篇文章
  • 累计创建 87 个标签
  • 累计收到 1 条评论

目 录CONTENT

文章目录

yum或rpm异常问题

Z先森
2018-12-28 / 0 评论 / 0 点赞 / 15 阅读 / 0 字 / 正在检测是否收录...

####yum异常 安装包的时候提示: The program package-cleanup is found in the yum-utils package. 或: There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. The program yum-complete-transaction is found in the yum-utils package. #####解决方法:

yum install yum-utils

运行 yum-complete-transaction

yum-complete-transaction --cleanup-only

清除可能存在的重复包

package-cleanup --dupes

清除可能存在的损坏包

package-cleanup --problems

####rpm异常 error: db3 error(12) from dbenv->open: Cannot allocate memory error: db3 error(12) from dbenv->close: Cannot allocate memory error: cannot open Packages index using db3 - Cannot allocate memory (12) error: cannot open Packages database in /var/lib/rpm error: db3 error(12) from dbenv->open: Cannot allocate memory error: db3 error(12) from dbenv->close: Cannot allocate memory error: cannot open Packages database in /var/lib/rpm 这是由于rpm数据库文件损坏所致 #####解决方法:

rm -rf /var/lib/rpm/__db*
rpm --rebuilddb

####更新yum异常 centos7更新或升级后使用yum install出现 Exiting on user cancel 这是yum的一个bug导致的问题。 #####解决办法: 修改/usr/lib/python2.7/site-packages/urlgrabber/grabber.py

vi /usr/lib/python2.7/site-packages/urlgrabber/grabber.py

将第1510行和1517行注释掉即可 修改前:

1510             elif errcode == 42:
1511                 # this is probably wrong but ultimately this is what happens
1512                 # we have a legit http code and a pycurl 'writer failed' code
1513                 # which almost always means something aborted it from outside
1514                 # since we cannot know what it is -I'm banking on it being
1515                 # a ctrl-c. XXXX - if there's a way of going back two raises to
1516                 # figure out what aborted the pycurl process FIXME
1517                 raise KeyboardInterrupt

修改后:

1510             #elif errcode == 42:
1511                 # this is probably wrong but ultimately this is what happens
1512                 # we have a legit http code and a pycurl 'writer failed' code
1513                 # which almost always means something aborted it from outside
1514                 # since we cannot know what it is -I'm banking on it being
1515                 # a ctrl-c. XXXX - if there's a way of going back two raises to
1516                 # figure out what aborted the pycurl process FIXME
1517             #    raise KeyboardInterrupt

yum clean metadata yum clean all

0
yum

评论区