1

While installing any package in RHEL 5 i'm getting this error

error: rpmdbNextIterator: skipping h#     150 region trailer: BAD, tag 1713401957 type 1919692085 offset -775433784 count 761427303

i clean the metadata using "yum clean all" but still same error

  • Are you installing RH packages or third-party packages? Maybe third-party rpms are created using a too-new version of rpm, with compression algos your local rpm/yum don't understand yet. – Ulrich Schwarz Oct 1 '17 at 14:32
  • OS is Oracle Enterprise Linux , i'm using oracle public-yum-el5.repo repository – OmiPenguin Oct 1 '17 at 14:42
5

It happen when followed package that were having problems when querying the rpm database for a package that was installed which cause meta tag mess up:

rpm --rebuilddb

it should all be back to normal when you rebuild rpm database package. In some case, the problem are still there and then you need to remove the old metas and rebuild again

mkdir /var/lib/rpm/old
mv /var/lib/rpm/Pubkeys /var/lib/rpm/old/
rpm --rebuilddb

Sometimes, in my case, the error are throw not are because of some bugs that unable to delete are certain directory.

$ sudo rpmdb --rebuilddb -v
error: could not delete old database at /var/lib/rpmold.17138

$ sudo rm -rf /var/lib/rpmold.17138

$ sudo rpmdb --rebuilddb -v

$ sudo dnf update --refresh
determining the fastest mirror (2 hosts).. done.
RPM Fusion for Fedora 28 - Free - Updates                                                                                                                        412 kB/s | 369 kB     00:00    
RPM Fusion for Fedora 28 - Nonfree - Updates                                                                                                                      35 kB/s |  84 kB     00:02    
Last metadata expiration check: 0:00:00 ago on Mon 27 Aug 2018 09:08:56 AM +08.
Dependencies resolved.
Nothing to do.
Complete!

The output above (with -v, verbose args) show me , I have permission problem to remove /var/lib/rpmold.17138 directory from my system. Just remove manually, rebuild rpm database and it worked.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.