Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
New Contributor

PROBLEM:

When installing RPM during HDP Upgrade on few nodes, the installation fails with the following error:

rpmdb: /var/lib/rpm/Packages: unexpected file format or type  
error: cannot open Packages index using db3 - Invalid argument (22)

ROOT CAUSE

This issue occurs when the RPM database is corrupt.

RESOLUTION

To resolve this issue, do the following:

  1. Take a backup of existing RPM database:
    mkdir /root/rpmdb.bak
    cp -rp /var/lib/rpm/__db* /root/rpmdb.bak/
  2. Remove the corrupted RPM database files:
    cd /var/lib/rpm
    rm -rf __db*
  3. Rebuild the RPM database:
    rpm --rebuilddb
194 Views
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎09-29-2017 09:36 PM
Updated by:
 
Contributors
Top Kudoed Authors