exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 141 discussion

Actual exam question from CompTIA's XK0-004
Question #: 141
Topic #: 1
[All XK0-004 Questions]

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

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

  • A. cd/var/lib/rpm; rpm --rebuilddb ; rm -f _db*; yum clean all
  • B. cd/var/lib/rpm; rpm -qd; rpm --rebuilddb; yum clean all
  • C. cd/var/lib/rpm; rpm -qa; rm -f _db*; yum clean all
  • D. cd/var/lib/rpm; rm -f _db*; rpm --rebuilddb; yum clean all
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
jahute27
Highly Voted 4 years, 5 months ago
Thinking D is right https://unix.stackexchange.com/questions/198703/yum-errorrpmdb-open-failed
upvoted 19 times
betty_boop
4 years, 5 months ago
nice catch
upvoted 8 times
...
...
DiaaEmara
Most Recent 2 years, 5 months ago
The try this to fix this problem: # rm -f /var/lib/rpm/__db* # db_verify /var/lib/rpm/Packages # rpm --rebuilddb # yum clean all And finally verify that error has gone with the following yum command # yum update
upvoted 1 times
DiaaEmara
2 years, 5 months ago
Thinking D is right
upvoted 1 times
...
...
Dan_Dan_The_Data_Center_Man
3 years, 6 months ago
Correct Answer: D. cd/var/lib/rpm; rm -f _db*; rpm --rebuilddb; yum clean all Basically you need to do the following. (in order) 1. Delete the rpm data base files. 2. Rebuild the RPM database. 3. Clean Yum cache. The answer includes changing directly to the directory instead of combining steps 1 and 2 with the rm command and file path in one. ( rm -f /var/lib/rpm/__db* ) Additionally you can verify the database files have been removed with before rebuilding: db_verify /var/lib/rpm/Packages
upvoted 4 times
...
user5x
3 years, 11 months ago
Concur with @jahute27 ... change to the RPM lib directory, remove exisiting databases, rebuild the databases, run the yum installer clean function
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago