Install daemonize on RHEL 8 / CentOS 8 / AlmaLinux 8

Sometimes when installing a package on Linux you will come across the following error:

Daemonize error while installing Jenkins package

The error reads the following:

Error:
 Problem: cannot install the best candidate for the job
  - nothing provides daemonize needed by jenkins-2.303.3-1.1.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

1. Cause

The cause of this error is that the daemonize package is required, but it cannot be found in the repositories available on the system. Thus it throws the error that you see above.

Daemonize is a helper tool which runs a command as a Unix daemon, and is required by many packages, such as Jenkins.

2. Solution

In order to fix this error we need to install a repository with contains this package. For most RHEL based distributions the EPEL repository, (which stands for Extra Packages for Enterprise Linux) can be used. In order to install the EPEL repository on CentOS 8 / RHEL 8 / AlmaLinux 8, run the following command:

sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

When the prompt asks you for a confirmation, type “Y” or “yes”.

After the epel-release repository is installed, refresh the internal repository list:

sudo dnf repolist

The command above will print a few lines, one of the lines should contain the entry Extra Packages for Enterprise Linux 8 – x86_64. If you see this message the EPEL repository is installed correctly.

Now try and install the daemonize package again. This time it should work:

sudo dnf install daemonize

If you did everything correctly, the output should be the following:

Extra Packages for Enterprise Linux 8 - x86_64                                          14 MB/s |  11 MB     00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64                                  50 kB/s | 958 kB     00:19
Dependencies resolved.
=======================================================================================================================
 Package                      Architecture              Version                          Repository               Size
=======================================================================================================================
Installing:
 daemonize                    x86_64                    1.7.8-1.el8                      epel                     27 k

Transaction Summary
=======================================================================================================================
Install  1 Package

Total download size: 27 k
Installed size: 34 k
Is this ok [y/N]: y
Downloading Packages:
daemonize-1.7.8-1.el8.x86_64.rpm                                                       790 kB/s |  27 kB     00:00
-----------------------------------------------------------------------------------------------------------------------
Total                                                                                   53 kB/s |  27 kB     00:00
Extra Packages for Enterprise Linux 8 - x86_64                                         1.6 MB/s | 1.6 kB     00:00
Importing GPG key 0x2F86D6A1:
 Userid     : "Fedora EPEL (8) <epel@fedoraproject.org>"
 Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                               1/1
  Installing       : daemonize-1.7.8-1.el8.x86_64                                                                  1/1
  Running scriptlet: daemonize-1.7.8-1.el8.x86_64                                                                  1/1
  Verifying        : daemonize-1.7.8-1.el8.x86_64                                                                  1/1

Installed:
  daemonize-1.7.8-1.el8.x86_64

Complete!

Success!

By Leendert de Borst

Freelance software architect with 10+ years of experience. Expert in translating complex technical problems into creative & simple solutions.

Leave a comment

Your email address will not be published. Required fields are marked *