当我尝试执行 yum 更新时遇到了问题,您能告诉我问题出在哪里吗?
[~]# 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
答案1
我认为您的系统中更新存储库的元数据已经过时了。
更新失败是因为找不到相应的perl-Git
更新包。不过,我检查了本地 CentOS 镜像,那里有正确的更新包。
因此,我怀疑您的更新存储库的元数据有点旧。我建议您清除元数据,然后重试更新。
yum clean metadata
如果它仍然失败,问题可能出在镜像上,而不是您的系统上。在这种情况下,只需等待 24 小时,希望镜像能够重新同步。
答案2
我尝试了很多命令,发现以下命令非常有用。
# yum update --disableexcludes=main