Knowledge BaseMetric InsightsSystem Installation[v6.x] Getting "Requires: container-selinux >= 2.9" error when installing Metric Insights v6.x on a single server

[v6.x] Getting "Requires: container-selinux >= 2.9" error when installing Metric Insights v6.x on a single server

Issue:

When running the Metric Insights v6.1.1 installer, it attempts to install Docker CE and then stops with the following package dependency error:

Error: Package: docker-ce-17.06.0.ce-1.el7.centos.x86_64 (docker-ce-stable)
           Requires: container-selinux >= 2.9
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

How do I get the right version of the package container-selinux to proceed with the install? The host operating system is Red Hat 7.7 (RHEL7). The deployment is a single server / simple install type.

Solution:

To resolve the package dependency error, a version of container-selinux that is greater than version 2.9 must be available. Note, rather than try to manually install it, we'll attempt to make the package available so that the installer can pull it while installing Docker CE. To do this, first confirm whether container-selinux is installed. Most likely it is not:

yum list container-selinux


If container-selinux is not installed, check to make sure the appropriate repository is available from which to pull the package from. The repository needed is named 

rhel-7-server-extras-rpms.

subscription-manager repos --list | grep -B3 'Enabled: 1'

 

If the Extra RPMS repo is not enabled, please enable it:

subscription-manager repos --enable=rhel-7-server-extras-rpms


If subscription-manager is not enabled on the machine, and you don't have the authority to subscribe, you can also install the package directly by running: sudo rpm -i http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm

 

Once the repository is enabled, or the package installed, rerun the Metric Insights installer. It should now pull the right package, or reference the existing package, to continue on with the Docker CE install. Good luck!