今天,我正在更新一台生产服务器(众多测试更新的服务器之一,然后更新其余的计算机)。
运行后不久,yum update
ssh 连接就断了 :/ 。再次使用屏幕会话登录后,这次我运行了,yum-complete-transaction
但出现了问题,所以我用--skip-broken
参数运行了它。对于未完成的事务,这很有效,但 perl 依赖性问题仍然存在。我尝试重新安装 perl 包,但它给了我一个错误:
Loaded plugins: langpacks, presto, refresh-packagekit
Installed package 4: perl-5.14.2-201.fc16.x86_64 (with updates) is not available.
Error: There is nothing to be done
我在尝试 yum 更新时遇到此错误:
Loaded plugins: langpacks, presto, refresh-packagekit
Dependency resolution
-> Running transaction check
---> Package perl.x86_64 4:5.14.2-201. FC16 is updated
-> Processing Dependency: perl = 4:5.14.2-201. FC16 for package: 1: perl-Pod-Escapes-1.04-201.fc16.noarch
-> Processing Dependency: perl = 4:5.14.2-201. FC16 for package: 4: perl-libs-5.14.2-201.fc16.x86_64
-> Processing Dependency: perl = 4:5.14.2-201. FC16 for package: perl-threads-1.83-201.fc16.x86_64
---> Package perl.x86_64 4:5.14.3-202. FC16 is updated
---> Package perl-CGI.noarch 0:3.52-201. FC16 is updated
---> Package perl-CGI.noarch 0:3.52-202. FC16 is updated
---> Package perl-Module-Pluggable.noarch 1:3.90-201. FC16 is updated
---> Package perl-Module-Pluggable.noarch 1:3.90-202. FC16 is updated
---> Package perl-PathTools.x86_64 0:3.33-201. FC16 is updated
---> Package perl-PathTools.x86_64 0:3.33-202. FC16 is updated
---> Package perl-Pod-Simple.noarch 1:3.16-201. FC16 is updated
---> Package perl-Pod-Simple.noarch 1:3.16-202. FC16 is updated
---> Package perl-macros.x86_64 4:5.14.2-201. FC16 is updated
---> Package perl-macros.x86_64 4:5.14.3-202. FC16 is updated
---> Package perl-parent.noarch 1:0.225-201. FC16 is updated
---> Package perl-parent.noarch 1:0.225-202. FC16 is updated
---> Package perl-threads-shared.x86_64 0:1.37-201. FC16 is updated
---> Package perl-threads-shared.x86_64 0:1.37-202. FC16 is updated
---> Package perl-version.noarch 3:0.88-201. FC16 is updated
---> Package perl-version.noarch 3:0.88-202. FC16 is updated
-> Complete dependency resolution
Error: package: 4: perl-libs-5.14.2-201.fc16.x86_64 (@ updates)
Requires: perl = 4:5.14.2-201. FC16
Removing: 4: perl-5.14.2-201.fc16.x86_64 (@ updates)
perl = 4:5.14.2-201. FC16
Updated by: 4: perl-5.14.3-202.fc16.x86_64 (updates)
perl = 4:5.14.3-202. FC16
Available: 4: perl-5.14.1-188.fc16.x86_64 (fedora)
perl = 4:5.14.1-188. FC16
Error: Package: perl-threads-1.83-201.fc16.x86_64 (@ updates)
Requires: perl = 4:5.14.2-201. FC16
Removing: 4: perl-5.14.2-201.fc16.x86_64 (@ updates)
perl = 4:5.14.2-201. FC16
Updated by: 4: perl-5.14.3-202.fc16.x86_64 (updates)
perl = 4:5.14.3-202. FC16
Available: 4: perl-5.14.1-188.fc16.x86_64 (fedora)
perl = 4:5.14.1-188. FC16
Error: Package: 1: perl-Pod-Escapes-1.04-201.fc16.noarch (@ updates)
Requires: perl = 4:5.14.2-201. FC16
Removing: 4: perl-5.14.2-201.fc16.x86_64 (@ updates)
perl = 4:5.14.2-201. FC16
Updated by: 4: perl-5.14.3-202.fc16.x86_64 (updates)
perl = 4:5.14.3-202. FC16
Available: 4: perl-5.14.1-188.fc16.x86_64 (fedora)
perl = 4:5.14.1-188. FC16
You could try using - skip-broken to work around the problem
** Found 6 pre-existing problems of the RPM database. The result of the command "yum check":
1: perl-Pod-Escapes-1.04-202.fc16.noarch is a duplicate 1: perl-Pod-Escapes-1.04-201.fc16.noarch
1: perl-Pod-Escapes-1.04-202.fc16.noarch has missing requirements perl = ('4 ', '5 .14.3', '202. FC16 ')
4: perl-libs-5.14.3-202.fc16.x86_64 is a duplicate 4: perl-libs-5.14.2-201.fc16.x86_64
4: perl-libs-5.14.3-202.fc16.x86_64 has missing requirements perl = ('4 ', '5 .14.3', '202. FC16 ')
perl-threads-1.83-202.fc16.x86_64 is a duplicate perl-threads-1.83-201.fc16.x86_64
perl-threads-1.83-202.fc16.x86_64 has missing requirements perl = ('4 ', '5 .14.3', '202. FC16 ')
(这是从我的母语翻译成英文的)
如何处理?(下次我将使用屏幕更新系统)
我的系统是 Fedora 16,带有 3.2.3-2.fc16.x86_64 内核。
答案1
快速运行yum clean all
,然后检查 RPM 数据库 - rpm --rebuilddb
- 然后重试。
你是对的...screen
下次在远程会话的前台运行关键或重要的系统进程时一定要使用它。
答案2
我设法通过删除 perl-libs、perl-threads 和 perl-Pod-Escapes 来解决依赖问题。删除这些应用程序很容易(没有依赖关系)。之后yum update
一切都正常,即使删除的应用程序也得到了更新(我认为存在某种重复问题)。
对我来说使用屏幕的教训:)