起因:从Centos 6.X直接升级为7.0然后执行yum upgrade报错:
** Found 38 pre-existing rpmdb problem(s), 'yum check' output follows:
attr-2.4.44-7.el6.x86_64 has missing requires of libattr = ('0', '2.4.44', '7.el6')
cloog-ppl-0.15.7-1.2.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
cpp-4.4.7-16.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
root cause:
系统upgrade的时候,残存了上一个版本的软件包信息(比如升级到了attr-2.4.44,但系统中存在了Centos6下的软件包信息)。
解决办法:
1).配置正确的yum源
#yum install epel-release
2).执行相关命令
#yum clean all ##清除本地yum缓存
#yum distro-sync ##同步本地软件和epel源的软件包信息
至此问题基本解决
如果还有个别异常的建议重新安装该软件
重装步骤1.使用rpm -qa找到该软件2.使用yum remove卸载该依赖包3.重新安装