%pre scriptlet failed error for yum package install

8.6k views Asked by At

While installing package using yum, i get following error:

$ yum install <rpm_name> -v -y

error: %pre(<rpm_name>) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package <rpm_name>
Warning: scriptlet or other non-fatal errors occurred during transaction.
Verifying : <rpm_name> 1/1
What is this? <rpm_name>
VerifyTransaction time: 0.003
Transaction time: 0.139

How to fix this?

4

There are 4 answers

0
Saksham Khare On BEST ANSWER

turned out there was some issue with rpm db. The issue resolved after rebuild rpm DB, referred this link: https://www.cyberciti.biz/tips/rebuilding-corrupted-rpm-database.html

0
Romeo Ninov On

Your problem is error in the rpm package itself. If you did this package check preinstallation script. If not you can contact the package creator and ask him to do this.

0
msuchy On

Download that rpm package a run:

rpm -qp --scripts <rpmname>.rpm

This will give you the content of the scriptlet assigned to this package. RPM is trying to execute and somewhere there is an error.

0
Ricardo On

For me in RHEL the solution was running this code:

getent group cgred >/dev/null || groupadd cgred

Found it here: https://access.redhat.com/solutions/62728