RPM installation fails with 'db3 error(12) from dbcursor->c_put: Cannot allocate memory' in Red Hat Enterprise Linux 6

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6

Issue

  • During rpm installation, command is failing with error.
error: db3 error(12) from dbcursor->c_put: Cannot allocate memory
  • After the problem happens, the rpm command sometimes fails, core-dumped, or/and the rpm database gets corrupted.

Resolution

  • It might be a corrupted RPMDB. In order to fix it please run:

    # rpm --rebuilddb
    

    And retry the operation.

  • This has been fixed in db4-4.7.25-20.el6_7 which is shipped from RHEL 6.8

  • Update the grub2 package to fix this issue.

Root Cause

Diagnostic Steps

/var/lib/rpm/Packages contains following error.

`'rpmdb_verify: /var/lib/rpm/Packages: DB_VERIFY_BAD: Database verification failed'` upon rpmdb_verify
  • Component
  • db4

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments