yum update失敗問題解決
運行#yum update
出現以下錯誤
--> Processing Conflict: autofs conflicts cyrus-sasl-lib < 2.1.22-5.el5_4.3
--> Finished Dependency Resolution
1:autofs-5.0.1-0.rc2.143.el5_6.2.i386 from update has depsolving problems
--> autofs conflicts with cyrus-sasl-lib
selinux-policy-devel-2.4.6-300.el5_6.1.noarch from update has depsolving problems
--> Missing Dependency: checkpolicy >= 1.33.1-5 is needed by package selinux-policy-de
lvm2-2.02.74-5.el5_6.1.i386 from update has depsolving problems
--> Missing Dependency: device-mapper >= 1.02.55-2 is needed by package lvm2-2.02.74-5
Error: autofs conflicts with cyrus-sasl-lib
Error: Missing Dependency: checkpolicy >= 1.33.1-5 is needed by package selinux-policy-d
Error: Missing Dependency: device-mapper >= 1.02.55-2 is needed by package lvm2-2.02.74-
You could try using 1。--skip-broken to work around the problem
You could try running: 2。package-cleanup --problems
3。package-cleanup --dupes
4。rpm -Va --nofiles --nodigest
金色字告訴我們可以用 2 3 4來查看問題原因
[[email protected] Server]# package-cleanup --dupes
Setting up yum
Repository base is listed more than once in the configuration
Repository dag is listed more than once in the configuration
[[email protected] Server]# package-cleanup --problems
Setting up yum
Repository base is listed more than once in the configuration
Reading local RPM database
Processing all local requires
No problems found
當終端顯示Repository base is listed more than once in the configuration:
它告訴我們有個定義重複了:
觀察/etc/yum.repos/裡面的文件和/etc/yum.cof,[base] [dag]這些如果重複定義了,會報此錯。
將重複刪除,問題解決
再次運行#package-cleanup --problems不出現Repository base is listed more than once in the configuration:的時候
運行#yum update --skip-broken
update成功!
要是有以下提示
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186
Public key for postgresql-libs-8.1.11-1.el5_1.1.i386.rpm is not installed
只需用下面方法將簽名重新導入一次即可。
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Hits: 82
Yum更新進行了很長一段時間後,就會發生錯誤。↓!
1:autofs-5.0.1-0.rc2.143.el5_5.6.i386 from updates has depsolving problems
--> autofs conflicts with cyrus-sasl-lib
Error: autofs conflicts with cyrus-sasl-lib
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
yum clearn all執行後還是有衝突請執行以下指令
# yum install yum-utils
#package-cleanup --dupes
#package-cleanup --cleandupes
# yum-complete-transaction
再更新看看是否正常