yum update fails with "Error in PREIN scriptlet in rpm package libcgroup"

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 6
  • Red Hat Network (RHN)

Issue

  • yum update fails with below error messages:

    Running Transaction
    Error in PREIN scriptlet in rpm package libcgroup-0.37-2.el6.x86_64
    error: %pre(libcgroup-0.37-2.el6.x86_64) scriptlet failed, exit status 1
    error:   install: %pre scriptlet failed (2), skipping libcgroup-0.37-2.el6
    libcgroup-0.36.1-6.el6_0.1.x86_64 was supposed to be removed but is not!
    
    Failed:
      libcgroup.x86_64 0:0.37-2.el6
    

Resolution

  • As manuall rpm installation fails after "groupadd cgred" step, run this command manually and then install latest version of libcgroup package.
# getent group cgred >/dev/null || groupadd cgred

Diagnostic Steps

  • Install libcgroup package manually using "rpm -ivvvh libcgroup-0.37-2.el6.x86_64.rpm" ,

    # rpm -ivvvh libcgroup-0.37-2.el6.x86_64.rpm
    D: ============== libcgroup-0.37-2.el6.x86_64.rpm
    D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
    .
    .
    + getent group cgred
    + groupadd cgred
    D:   install: waitpid(12945) rc 12945 status 100 secs 0.042
    error: %pre(libcgroup-0.37-2.el6.x86_64) scriptlet failed, exit status 1
    error:   install: %pre scriptlet failed (2), skipping libcgroup-0.37-2
    

from the above output can see that rpm installation fails after "groupadd cgred" step .

  • Component
  • yum

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