centos – 为什么yum不会安装更新?

前端之家收集整理的这篇文章主要介绍了centos – 为什么yum不会安装更新?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我遇到错误,我认为使用coreutils,yum不会更新.这是我运行yum update时看到的精简输出
  1. Resolving Dependencies
  2. There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
  3. The program yum-complete-transaction is found in the yum-utils package.
  4. --> Running transaction check
  5. ---> Package PyYAML.x86_64 0:3.10-3.el6 will be updated
  6. ---> Package PyYAML.x86_64 0:3.10-3.1.el6 will be an update
  7. ... more of the same,and then:
  8. --> Processing Dependency: coreutils = 8.4-31.el6_5.2 for package: coreutils-libs-8.4-31.el6_5.2.x86_64
  9. ---> Package coreutils.x86_64 0:8.4-37.el6 will be an update
  10. ... then more of the same --> Finished Dependency Resolution
  11. --> Running transaction check
  12. ---> Package coreutils.x86_64 0:8.4-31.el6_5.2 will be updated
  13. --> Processing Dependency: coreutils = 8.4-31.el6_5.2 for package: coreutils-libs-8.4-31.el6_5.2.x86_64
  14. ---> Package kernel.x86_64 0:2.6.32-431.17.1.el6 will be erased
  15. --> Finished Dependency Resolution
  16. Error: Package: coreutils-libs-8.4-31.el6_5.2.x86_64 (@updates)
  17. Requires: coreutils = 8.4-31.el6_5.2
  18. Removing: coreutils-8.4-31.el6_5.2.x86_64 (@updates)
  19. coreutils = 8.4-31.el6_5.2
  20. Updated By: coreutils-8.4-37.el6.x86_64 (base)
  21. coreutils = 8.4-37.el6
  22. You could try using --skip-broken to work around the problem
  23. ** Found 71 pre-existing rpmdb problem(s),'yum check' output follows:
  24. audit-libs-2.3.7-5.el6.x86_64 is a duplicate with audit-libs-2.2-4.el6_5.x86_64
  25. audit-libs-python-2.3.7-5.el6.x86_64 is a duplicate with audit-libs-python-2.2-4.el6_5.x86_64
  26. ... then lots more like the above duplicate

我有另一台(几乎)与此相同的服务器(它们是负载平衡的并且使用相同的图像工作)并且没有遇到同样的问题.可能是什么问题,我应该如何最好地进行?

更新:

我还运行了失败的yum-complete-transaction,并说它已经重命名了事务文件.它仍然说有一个不完整的交易,但现在当我运行时会发生这种情况:

  1. [root@nico ~]# yum-complete-transaction
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. * webtatic: uk.repo.webtatic.com
  5. drivesrvr | 951 B 00:00
  6. There are 1 outstanding transactions to complete. Finishing the most recent one
  7. The remaining transaction had 252 elements left to run
  8. ... lots of:
  9. Package name-1.23.x8x_64 already installed and latest version
  10. ...
  11. --> Running transaction check
  12. ... lots of entries like this:
  13. ---> Package PyYAML.x86_64 0:3.10-3.el6 will be updated
  14. ... and this:
  15. ---> Package PyYAML.x86_64 0:3.10-3.1.el6 will be an update
  16. ... and this:
  17. ---> Package audit-libs.x86_64 0:2.2-4.el6_5 will be erased
  18. Killed

然后它突然停止与杀死线.

我试着运行yum update –skip-broken next:

  1. [root@nico ~]# yum update --skip-broken
  2. Freeing read locks for locker 0x7d: 28940/139976145426176
  3. Freeing read locks for locker 0x7f: 28940/139976145426176
  4. Freeing read locks for locker 0x80: 28940/139976145426176
  5. Freeing read locks for locker 0x81: 28940/139976145426176
  6. Freeing read locks for locker 0x82: 28940/139976145426176
  7. Loaded plugins: downloadonly,fastestmirror,replace
  8. Setting up Update Process
  9. Loading mirror speeds from cached hostfile
  10. * webtatic: uk.repo.webtatic.com
  11. drivesrvr | 951 B 00:00
  12. Resolving Dependencies
  13. There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
  14. --> Running transaction check
  15. ... lots of will be updated/will be an update/etc,then:
  16. --> Processing Dependency: coreutils = 8.4-31.el6_5.2 for package: coreutils-libs-8.4-31.el6_5.2.x86_64

然后还有几个正在运行的事务检查:s和Processing Dependency:coreutils = …更多的条目将被更新/将成为更新条目.然后:

  1. Packages skipped because of dependency problems:
  2. coreutils-8.4-37.el6.x86_64 from base
  3.  
  4. Dependencies Resolved

然后我会看到一个包含安装:和更新:包列表的表,最后有一个摘要

  1. Install 2 Package(s)
  2. Upgrade 79 Package(s)
  3. Remove 1 Package(s)

然后它下载所有包(81/81成功),最后显示

  1. Total 3.0 MB/s | 115 MB 00:37
  2. Running rpm_check_debug
  3. Killed

更新2:

我也跑了所有的yum干净,也有一些问题.我找到了一些删除__db *文件的建议,然后再试一次:

  1. [root@nico ~]# yum clean all
  2. rpmdb: Thread/process 29404/139880514733824 Failed: Thread died in Berkeley DB library
  3. error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error,run database recovery
  4. error: cannot open Packages index using db3 - (-30974)
  5. error: cannot open Packages database in /var/lib/rpm
  6. CRITICAL:yum.main:
  7.  
  8. Error: rpmdb open Failed
  9. [root@nico ~]# rm -f /var/lib/rpm/__db*
  10. [root@nico ~]# yum clean all
  11. Loaded plugins: downloadonly,replace
  12. Cleaning repos: base drivesrvr epel extras ius newrelic percona-release-noarch percona-release-x86_64 rackspace updates webtatic
  13. Cleaning up Everything
  14. Cleaning up list of fastest mirrors
  15. [root@nico ~]# yum clean all
  16. Loaded plugins: downloadonly,replace
  17. Cleaning repos: base drivesrvr epel extras ius newrelic percona-release-noarch percona-release-x86_64 rackspace updates webtatic
  18. Cleaning up Everything
  19. [root@nico ~]#

更新3:

我运行/ var / log / messages并在运行yum-complete-transaction时看到了很多输出,其中最后两行是:

  1. Nov 14 08:19:47 nico kernel: Out of memory: Kill process 30995 (yum-complete-tr) score 149 or sacrifice child
  2. Nov 14 08:19:47 nico kernel: Killed process 30995,UID 0,(yum-complete-tr) total-vm:641952kB,anon-RSS:181420kB,file-RSS:4kB

所以可能这表明它与记忆有关.如果是这样,这是需要更多内存的情况,还是我需要调查另一个问题?

类似的问题 – 和我的修复.
我的内存也有问题,所以不得不升级VPS的内存.
然后我做了yum更新 – 当然得到了上面的错误.
所以看了失败了,并注意到Yum安装了(好吧,开始安装)最新的coreutils – 版本37,而我仍然有31位.
首先,删除版本37,然后清理,然后再次运行yum update.

这导致’31’版本可以干净地“更新”.
见下面的工作:

  1. --> Running transaction check
  2. ---> Package coreutils.x86_64 0:8.4-31.el6_5.2 will be updated
  3. --> Processing Dependency: coreutils = 8.4-31.el6_5.2 for package: coreutils-libs-8.4-31.el6_5.2.x86_64
  4. ---> Package coreutils.x86_64 0:8.4-37.el6 will be an update
  5. --> Finished Dependency Resolution
  6. Error: Package: coreutils-libs-8.4-31.el6_5.2.x86_64 (@updates)
  7. Requires: coreutils = 8.4-31.el6_5.2
  8. Removing: coreutils-8.4-31.el6_5.2.x86_64 (@updates)
  9. coreutils = 8.4-31.el6_5.2
  10. Updated By: coreutils-8.4-37.el6.x86_64 (base)
  11. coreutils = 8.4-37.el6
  12. You could try using --skip-broken to work around the problem

运行yum删除coreutils-libs-8.4-37.el6.x86_64:

  1. Loaded plugins: fastestmirror
  2. Setting up Remove Process
  3. Resolving Dependencies
  4. --> Running transaction check
  5. ---> Package coreutils-libs.x86_64 0:8.4-37.el6 will be erased
  6. --> Finished Dependency Resolution
  7.  
  8. Dependencies Resolved
  9. ==============================
  10. ========================================================================================
  11.  
  12. Package Arch Version Repository Size
  13. ======================================================================================================================
  14. Removing:
  15. coreutils-libs x86_64 8.4-37.el6 installed 5.4 k
  16.  
  17. Transaction Summary
  18. ======================================================================================================================
  19. Remove 1 Package(s)
  20.  
  21. Installed size: 5.4 k
  22. Is this ok [y/N]: y
  23. Downloading Packages:
  24. Running rpm_check_debug
  25. Running Transaction Test
  26. Transaction Test Succeeded
  27. Running Transaction
  28. Erasing : coreutils-libs-8.4-37.el6.x86_64 1/1
  29. Verifying : coreutils-libs-8.4-37.el6.x86_64 1/1
  30.  
  31. Removed:
  32. coreutils-libs.x86_64 0:8.4-37.el6
  33.  
  34. Complete!

使用yum清理所有清理:

  1. Loaded plugins: fastestmirror
  2. Cleaning repos: base extras updates
  3. Cleaning up Everything
  4. Cleaning up list of fastest mirrors

做包列表刷新yum更新:

  1. Loaded plugins: fastestmirror
  2. Setting up Update Process
  3. Determining fastest mirrors
  4. * base: mirrors.lga7.us.voxel.net
  5. * extras: mirrors.lga7.us.voxel.net
  6. * updates: mirror.cc.columbia.edu
  7. base | 3.7 kB 00:00
  8. base/primary_db | 4.6 MB 00:00
  9. extras | 3.4 kB 00:00
  10. extras/primary_db | 30 kB 00:00
  11. updates | 3.4 kB 00:00
  12. updates/primary_db | 1.5 MB 00:00
  13. Resolving Dependencies
  14. --> Running transaction check
  15. ---> Package coreutils.x86_64 0:8.4-31.el6_5.2 will be updated
  16. ---> Package coreutils.x86_64 0:8.4-37.el6 will be an update
  17. ---> Package coreutils-libs.x86_64 0:8.4-31.el6_5.2 will be updated
  18. ---> Package coreutils-libs.x86_64 0:8.4-37.el6 will be an update
  19. --> Finished Dependency Resolution
  20.  
  21. Dependencies Resolved
  22.  
  23. ======================================================================================================================
  24. Package Arch Version Repository Size
  25. ======================================================================================================================
  26. Updating:
  27. coreutils x86_64 8.4-37.el6 base 3.0 M
  28. coreutils-libs x86_64 8.4-37.el6 base 50 k
  29.  
  30. Transaction Summary
  31. ======================================================================================================================
  32. Upgrade 2 Package(s)
  33.  
  34. Total download size: 3.1 M
  35. Is this ok [y/N]: y
  36. Downloading Packages:
  37. (1/2): coreutils-8.4-37.el6.x86_64.rpm | 3.0 MB 00:00
  38. (2/2): coreutils-libs-8.4-37.el6.x86_64.rpm | 50 kB 00:00
  39. ----------------------------------------------------------------------------------------------------------------------
  40. Total 44 MB/s | 3.1 MB 00:00
  41. Running rpm_check_debug
  42. Running Transaction Test
  43. Transaction Test Succeeded
  44. Running Transaction
  45. Updating : coreutils-libs-8.4-37.el6.x86_64 1/4
  46. Updating : coreutils-8.4-37.el6.x86_64 2/4
  47. Cleanup : coreutils-libs-8.4-31.el6_5.2.x86_64 3/4
  48. Cleanup : coreutils-8.4-31.el6_5.2.x86_64 4/4
  49. Verifying : coreutils-8.4-37.el6.x86_64 1/4
  50. Verifying : coreutils-libs-8.4-37.el6.x86_64 2/4
  51. Verifying : coreutils-libs-8.4-31.el6_5.2.x86_64 3/4
  52. Verifying : coreutils-8.4-31.el6_5.2.x86_64 4/4
  53.  
  54. Updated:
  55. coreutils.x86_64 0:8.4-37.el6 coreutils-libs.x86_64 0:8.4-37.el6
  56.  
  57. Complete!

-Sup.

猜你在找的CentOS相关文章