Red Hat Satellite 6 installation fails with error Execution of '/bin/yum -d 0 -e 0 -y install tfm-rubygem-foreman_openscap' returned 1: Error unpacking rpm package tfm-rubygem-foreman_openscap-4.1.3-1.el7sat.noarch

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • Red Hat Satellite 6 installation fails with below error in /var/log/foreman-installer/satellite.log file:

     [ERROR ] [configure] Execution of '/bin/yum -d 0 -e 0 -y install tfm-rubygem-foreman_openscap' returned 1: Error unpacking rpm package tfm-rubygem-foreman_openscap-4.1.3-1.el7sat.noarch
    [ERROR ] [configure] unpacking of archive failed: cpio: mkdir failed - No such file or directory
    [ERROR ] [configure] /Stage[main]/Foreman::Plugin::Openscap/Foreman::Plugin[openscap]/Package[tfm-rubygem-$oreman_openscap]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/yum -d 0 -e 0 -y install tfm-rubygem-for$man_openscap' returned 1: Error unpacking rpm package tfm-rubygem-foreman_openscap-4.1.3-1.el7sat.noarch
    [ERROR ] [configure] unpacking of archive failed: cpio: mkdir failed - No such file or directory
    

Resolution

  • The missing directory /usr/share/foreman/public/ is provided by foreman package. Reinstall the foreman package which should create the mentioned missing directory.

    # yum reinstall foreman
    

For more KB articles/solutions related to Red Hat Satellite 6.x Installation/Upgrade/Update Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Installation/Upgrade/Update Issues.

Root Cause

  • The /usr/share/foreman/public/ directory is missing from Satellite machine.

Diagnostic Steps

  • Download the tfm-rubygem-foreman_openscap package and capture the strace while trying to install it:

    # strace -fxvto /tmp/strace.txt -s 4096 rpm -ivh package_name
    
  • The strace shows that the update is getting failed at below step:

    131286 14:35:30 mkdir("/usr/share/foreman/public/apipie-cache", 0755) = -1 ENOENT (No such file or directory)
    
  • As per the strace, the below parent directory is missing which is provided by foreman package:

    # ls -ld /usr/share/foreman/public/
    ls: cannot access /usr/share/foreman/public/: No such file or directory
    
SBR
Product(s)
Components
Category

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.