Centos6

執行 yum 更新時的依賴關係問題

  • May 17, 2016

當我嘗試進行 yum update 時,遇到了問題,你能告訴我問題出在哪裡嗎?

[~]# yum update --skip-broken
Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
base         | 3.7 kB     00:00     
extras       | 3.4 kB     00:00     
updates      | 3.4 kB     00:00
Resolving Dependencies
--> Running transaction check
---> Package emacs-git.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package emacs-git.noarch 0:1.7.1-4.el6_7.1 will be an update
---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be updated
--> Processing Dependency: git = 1.7.1-3.el6_4.1 for package: perl-Git- 1.7.1-3.el6_4.1.noarch
---> Package git.x86_64 0:1.7.1-4.el6_7.1 will be an update
--> Processing Dependency: perl-Git = 1.7.1-4.el6_7.1 for package: git-1.7.1-4.el6_7.1.x86_64
---> Package git-all.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-all.noarch 0:1.7.1-4.el6_7.1 will be an update
--> Processing Dependency: perl-Git = 1.7.1-4.el6_7.1 for package: git-all-1.7.1-4.el6_7.1.noarch
---> Package git-cvs.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-cvs.noarch 0:1.7.1-4.el6_7.1 will be an update
---> Package git-email.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-email.noarch 0:1.7.1-4.el6_7.1 will be an update
--> Processing Dependency: perl-Git = 1.7.1-4.el6_7.1 for package: git-email-1.7.1-4.el6_7.1.noarch
---> Package git-gui.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-gui.noarch 0:1.7.1-4.el6_7.1 will be an update
---> Package git-svn.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-svn.noarch 0:1.7.1-4.el6_7.1 will be an update
---> Package gitk.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package gitk.noarch 0:1.7.1-4.el6_7.1 will be an update
--> Running transaction check
---> Package emacs-git.noarch 0:1.7.1-3.el6_4.1 will be updated
--> Processing Dependency: emacs-git = 1.7.1-3.el6_4.1 for package: git-all-1.7.1-3.el6_4.1.noarch
---> Package git-cvs.noarch 0:1.7.1-3.el6_4.1 will be updated
--> Processing Dependency: git-cvs = 1.7.1-3.el6_4.1 for package: git-all-1.7.1-3.el6_4.1.noarch
---> Package git-gui.noarch 0:1.7.1-3.el6_4.1 will be updated
--> Processing Dependency: git-gui = 1.7.1-3.el6_4.1 for package: git-all-1.7.1-3.el6_4.1.noarch
---> Package git-svn.noarch 0:1.7.1-3.el6_4.1 will be updated
--> Processing Dependency: git-svn = 1.7.1-3.el6_4.1 for package: git-all-1.7.1-3.el6_4.1.noarch
---> Package gitk.noarch 0:1.7.1-3.el6_4.1 will be updated
--> Processing Dependency: gitk = 1.7.1-3.el6_4.1 for package: git-all-1.7.1-3.el6_4.1.noarch

 Packages skipped because of dependency problems:
 emacs-git-1.7.1-4.el6_7.1.noarch from updates
 git-1.7.1-4.el6_7.1.x86_64 from updates
 git-all-1.7.1-4.el6_7.1.noarch from updates
 git-cvs-1.7.1-4.el6_7.1.noarch from updates
 git-email-1.7.1-4.el6_7.1.noarch from updates
 git-gui-1.7.1-4.el6_7.1.noarch from updates
 git-svn-1.7.1-4.el6_7.1.noarch from updates
 gitk-1.7.1-4.el6_7.1.noarch from updates

我嘗試手動安裝這些軟體包但失敗了,不知道該怎麼辦?

更新:- 我也在發布 yum 更新輸出。

# yum update
Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
base           | 3.7 kB     00:00     
extras             | 3.4 kB     00:00     
updates               | 3.4 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package emacs-git.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package emacs-git.noarch 0:1.7.1-4.el6_7.1 will be an update
---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be updated
--> Processing Dependency: git = 1.7.1-3.el6_4.1 for package: perl-Git-1.7.1-3.el6_4.1.noarch
---> Package git.x86_64 0:1.7.1-4.el6_7.1 will be an update
--> Processing Dependency: perl-Git = 1.7.1-4.el6_7.1 for package: git-1.7.1-4.el6_7.1.x86_64
---> Package git-all.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-all.noarch 0:1.7.1-4.el6_7.1 will be an update
--> Processing Dependency: perl-Git = 1.7.1-4.el6_7.1 for package: git-all-1.7.1-4.el6_7.1.noarch
---> Package git-cvs.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-cvs.noarch 0:1.7.1-4.el6_7.1 will be an update
---> Package git-email.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-email.noarch 0:1.7.1-4.el6_7.1 will be an update
--> Processing Dependency: perl-Git = 1.7.1-4.el6_7.1 for package: git-email-1.7.1-4.el6_7.1.noarch
---> Package git-gui.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-gui.noarch 0:1.7.1-4.el6_7.1 will be an update
---> Package git-svn.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package git-svn.noarch 0:1.7.1-4.el6_7.1 will be an update
---> Package gitk.noarch 0:1.7.1-3.el6_4.1 will be updated
---> Package gitk.noarch 0:1.7.1-4.el6_7.1 will be an update
--> Finished Dependency Resolution
Error: Package: perl-Git-1.7.1-3.el6_4.1.noarch (@updates)
      Requires: git = 1.7.1-3.el6_4.1
      Removing: git-1.7.1-3.el6_4.1.x86_64 (@updates)
          git = 1.7.1-3.el6_4.1
      Updated By: git-1.7.1-4.el6_7.1.x86_64 (updates)
          git = 1.7.1-4.el6_7.1
Error: Package: git-all-1.7.1-4.el6_7.1.noarch (updates)
      Requires: perl-Git = 1.7.1-4.el6_7.1
      Installed: perl-Git-1.7.1-3.el6_4.1.noarch (@updates)
          perl-Git = 1.7.1-3.el6_4.1
Error: Package: git-email-1.7.1-4.el6_7.1.noarch (updates)
      Requires: perl-Git = 1.7.1-4.el6_7.1
      Installed: perl-Git-1.7.1-3.el6_4.1.noarch (@updates)
          perl-Git = 1.7.1-3.el6_4.1
Error: Package: git-1.7.1-4.el6_7.1.x86_64 (updates)
      Requires: perl-Git = 1.7.1-4.el6_7.1
      Installed: perl-Git-1.7.1-3.el6_4.1.noarch (@updates)
          perl-Git = 1.7.1-3.el6_4.1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

我嘗試了很多命令,發現以下命令非常有用。

# yum update --disableexcludes=main

我認為您的系統用於更新儲存庫的元數據已過時。

由於找不到對應的perl-Git包更新,更新失敗。但是,我檢查了我本地的 CentOS 鏡像,並且那裡有正確的更新包。

因此,我懷疑您的更新儲存庫的元數據有些舊。我建議您清除元數據,然後再次嘗試更新。

yum clean metadata

如果仍然失敗,則問題可能出在鏡像上,而不是您的系統上。在這種情況下,只需等待 24 小時,以便鏡像恢復同步。

引用自:https://serverfault.com/questions/776976