layout: post
title: yum、rpm —issues
date: 2018-04-27
tags: [“Linux”,”包管理”]


一、CS服务器升级补丁包rpm数据库损坏修复

在修复阿里云ECS的系统漏洞时遇到一个问题:

使用yum update packeges 时,更新失败,导致rpm数据库损坏,即:

  1. 路径内的文件损坏

会出现如下错误提示:

  1. Loaded plugins: security
  2. Setting up Downgrade Process
  3. Resolving Dependencies
  4. --> Running transaction check
  5. ---> Package glibc.x86_64 0:2.12-1.209.el6_9.1 will be a downgrade
  6. --> Processing Dependency: glibc-common = 2.12-1.209.el6_9.1 for package: glibc-2.12-1.209.el6_9.1.x86_64
  7. ---> Package glibc.x86_64 0:2.12-1.209.el6_9.2 will be erased
  8. --> Finished Dependency Resolution
  9. You could try using --skip-broken to work around the problem
  10. ** Found 3352 pre-existing rpmdb problem(s), 'yum check' output follows:
  11. ConsoleKit-0.4.1-3.el6.x86_64 has missing requires of libc.so.6()(64bit)
  12. ConsoleKit-0.4.1-3.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  13. ConsoleKit-0.4.1-3.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.3.4)(64bit)
  14. ConsoleKit-0.4.1-3.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.4)(64bit)
  15. ConsoleKit-0.4.1-3.el6.x86_64 has missing requires of libpthread.so.0()(64bit)
  16. ConsoleKit-0.4.1-3.el6.x86_64 has missing requires of libpthread.so.0(GLIBC_2.2.5)(64bit)
  17. ConsoleKit-0.4.1-3.el6.x86_64 has missing requires of librt.so.1()(64bit)
  18. ConsoleKit-0.4.1-3.el6.x86_64 has missing requires of rtld(GNU_HASH)
  19. ConsoleKit-libs-0.4.1-3.el6.x86_64 has missing requires of libc.so.6()(64bit)
  20. ConsoleKit-libs-0.4.1-3.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  21. ConsoleKit-libs-0.4.1-3.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.3.4)(64bit)
  22. ConsoleKit-libs-0.4.1-3.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.4)(64bit)
  23. ConsoleKit-libs-0.4.1-3.el6.x86_64 has missing requires of libpthread.so.0()(64bit)
  24. ConsoleKit-libs-0.4.1-3.el6.x86_64 has missing requires of librt.so.1()(64bit)
  25. ConsoleKit-libs-0.4.1-3.el6.x86_64 has missing requires of rtld(GNU_HASH)
  26. MAKEDEV-3.24-6.el6.x86_64 has missing requires of libc.so.6()(64bit)
  27. MAKEDEV-3.24-6.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  28. MAKEDEV-3.24-6.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.3)(64bit)
  29. MAKEDEV-3.24-6.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.3.4)(64bit)
  30. MAKEDEV-3.24-6.el6.x86_64 has missing requires of libc.so.6(GLIBC_2.4)(64bit)
  31. MAKEDEV-3.24-6.el6.x86_64 has missing requires of rtld(GNU_HASH)
  32. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6()(64bit)
  33. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  34. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.3.4)(64bit)
  35. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  36. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.3.4)(64bit)
  37. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.4)(64bit)
  38. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of libpthread.so.0()(64bit)
  39. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of libpthread.so.0(GLIBC_2.2.5)(64bit)
  40. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of librt.so.1()(64bit)
  41. abrt-2.0.8-21.el6.centos.x86_64 has missing requires of rtld(GNU_HASH)
  42. abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6()(64bit)
  43. abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  44. abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.3)(64bit)
  45. abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.3.4)(64bit)
  46. abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.4)(64bit)
  47. abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 has missing requires of libdl.so.2()(64bit)
  48. abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 has missing requires of libpthread.so.0()(64bit)
  49. abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 has missing requires of rtld(GNU_HASH)
  50. abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6()(64bit)
  51. abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  52. abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.3.4)(64bit)
  53. abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.4)(64bit)
  54. abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_64 has missing requires of rtld(GNU_HASH)
  55. abrt-addon-python-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6()(64bit)
  56. abrt-addon-python-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  57. abrt-addon-python-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.4)(64bit)
  58. abrt-addon-python-2.0.8-21.el6.centos.x86_64 has missing requires of rtld(GNU_HASH)
  59. abrt-libs-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6()(64bit)
  60. abrt-libs-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  61. abrt-libs-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.3)(64bit)
  62. abrt-libs-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.3.4)(64bit)
  63. abrt-libs-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.4)(64bit)
  64. abrt-libs-2.0.8-21.el6.centos.x86_64 has missing requires of rtld(GNU_HASH)
  65. abrt-tui-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6()(64bit)
  66. abrt-tui-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.2.5)(64bit)
  67. abrt-tui-2.0.8-21.el6.centos.x86_64 has missing requires of libc.so.6(GLIBC_2.3.4)(64bit)
  68. abrt-tui-2.0.8-21.el6.centos.x86_64 has missing requires of rtld(GNU_HASH)

会出现大批量has missing requires of libc.so.6()
rpm数据库损坏使用yum update/install/reinstall packeges --skip-broken并不能够解决问题

正确的命令:
rpm --rebuild

文档更新时间: 2019-02-10 17:11   作者:张尚