Unable to install nagios-plugins-all on RHEL 8 with EPEL repository enabled

Written by - 0 comments

Published on - Listed in Linux


If you frequently read my blog articles you have probably noticed that I usually work on Debian and Ubuntu Linux systems. Occasionally some other Linux flavours mix it up.

This time I needed to install a new RHEL (Red Hat Enterprise Linux) 8 server from scratch, using Ansible as setup automation. It's been a while since I last worked with a RHEL system so I was sure I would hit some problems. And yes, I did.

Enabling the EPEL repositories

Still somewhere back in my grey brain cells was the information that I need to enable the EPEL repositories for certain packages, including nagios-plugins needed for the systems monitoring. The EPEL repos can be activated using a RPM package which will do the configuration for you in the background:

[root@rhel8 ~]# yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

You can then check the repo list to verify the epel repo is enabled:

[root@rhel8 ~]# yum repolist
Updating Subscription Management repositories.
repo id                                repo name
epel                                   Extra Packages for Enterprise Linux 8 - x86_64
rhel-8-for-x86_64-appstream-rpms       Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms          Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)

Installation of nagios-plugins-all fails

When the Ansible (setup) playbook ran on this RHEL8 server, the task to install monitoring related packages (including nagios-plugins-all) failed:

A manual try on the server resulted in the same error message:

[root@rhel8 ~]# yum install nagios-plugins-all
Updating Subscription Management repositories.
Last metadata expiration check: 0:22:50 ago on Tue 31 Jan 2023 09:45:04 AM CET.
Error:
 Problem: package nagios-plugins-all-2.3.3-6.el8.x86_64 requires nagios-plugins-disk_smb, but none of the providers can be installed
  - package nagios-plugins-disk_smb-2.3.3-6.el8.x86_64 requires perl(utf8::all), but none of the providers can be installed
  - conflicting requests
  - nothing provides perl(Import::Into) needed by perl-utf8-all-0.024-7.el8.noarch
  - nothing provides perl(PerlIO::utf8_strict) needed by perl-utf8-all-0.024-7.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

What happens here is that nagios-plugins-all package requires the installation of the nagios-plugins-disk_smb package which in turn requires the Perl module utf8::all, yet no other package provides this module. Great job, Red Hat, great job.

During research I came across a CentOS forum thread mentioning the same problem, but on a CentOS 8 system (which is meanwhile EOL). Not much more information could be found online. However while going through the EPEL site again, to verify I correctly installed the EPEL repos, I noticed something else:

NOTE for RHEL 8 users with certificate subscriptions: EPEL packages assume that the 'codeready-builder' repository is enabled

Huh? That's something new.

Enabling the codeready-builder repository

The note above hints that EPEL packages require the additional codeready-builder repository. As it's a note it can easily be missed. Let's enable this repository according to the EPEL information:

[root@rhel8 ~]# subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
Repository 'codeready-builder-for-rhel-8-x86_64-rpms' is enabled for this system.

Let's list the enabled repositories again:

[root@rhel8 ~]# dnf repolist
Updating Subscription Management repositories.
repo id                                    repo name
codeready-builder-for-rhel-8-x86_64-rpms   Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)
epel                                       Extra Packages for Enterprise Linux 8 - x86_64

rhel-8-for-x86_64-appstream-rpms           Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms              Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)

Note: In the meantime I've learned that the newer dnf command replaces the older yum command, so I'm going to use this command from now on (and also adjusted the Ansible playbook task for RHEL 8 accordingly using the dnf builtin module).

We can now see, that, besides the additional epel repository, the repository "codeready-builder-for-rhel-8-x86_64-rpms" is now also listed.

Installation of nagios-plugins-all now works

Now with this additional codeready-builder repository enabled, let's try the installation of nagios-plugins-all again:

[root@rhel8 ~]# dnf install nagios-plugins-all
Updating Subscription Management repositories.
Last metadata expiration check: 0:01:13 ago on Tue 31 Jan 2023 10:34:51 AM CET.
Dependencies resolved.

[...]

Install  133 Packages

Total download size: 18 M
Installed size: 47 M
Is this ok [y/N]: y

And finally the installation worked and the package is now listed under the installed packages:

[root@rhel8 ~]# rpm -qa | grep nagios-plugins-all
nagios-plugins-all-2.3.3-6.el8.x86_64

After another Ansible playbook run, the task in question now returns OK:


More recent articles: