nerdexam
CompTIA

XK0-005 · Question #153

A systems administrator installs a simple package, but the Linux system returns the following error: rpmdb . To verify if there is a problem in the RPM database, the systems administrator runs the…

The correct answer is D. cd/var/lib/rpm; rm -f _db*; rpm --rebuilddb; yum clean all. When the RPM database is corrupt, the correct recovery sequence is: (1) navigate to /var/lib/rpm, (2) remove the corrupt Berkeley DB lock/database files with rm -f _db*, (3) rebuild the RPM database from installed package headers using rpm --rebuilddb, and (4) clean the yum…

Troubleshooting

Question

A systems administrator installs a simple package, but the Linux system returns the following error: rpmdb . To verify if there is a problem in the RPM database, the systems administrator runs the open fails following command:

Which of the following commands should the systems administrator run NEXT to resolve this issue?

Options

  • Acd/var/lib/rpm; rpm --rebuilddb ; rm -f _db*; yum clean all
  • Bcd/var/lib/rpm; rpm -qd; rpm --rebuilddb; yum clean all
  • Ccd/var/lib/rpm; rpm -qa; rm -f _db*; yum clean all
  • Dcd/var/lib/rpm; rm -f _db*; rpm --rebuilddb; yum clean all

How the community answered

(63 responses)
  • A
    3% (2)
  • B
    14% (9)
  • C
    6% (4)
  • D
    76% (48)

Explanation

When the RPM database is corrupt, the correct recovery sequence is: (1) navigate to /var/lib/rpm, (2) remove the corrupt Berkeley DB lock/database files with rm -f _db*, (3) rebuild the RPM database from installed package headers using rpm --rebuilddb, and (4) clean the yum cache with yum clean all. Option D follows this exact order. Options A and B place --rebuilddb before removing the corrupt files (A removes them after, B never removes them), and option C never rebuilds the database - all of which would leave the database in a bad state or fail to fully resolve corruption.

Topics

#RPM#Package Management#Database Repair#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice