Automatic detection of the distribution doesn't work for AlmaLinux and CloudLinux, so for building you have to specify --with-distro = REDHAT. 
 
https://bugzilla.redhat.com/show_bug.cgi?id=2001636
 
diff guestfs-appliance.m4 libguestfs/m4/guestfs-appliance.m4
108c108
<                     [FEDORA | RHEL | CENTOS],[DISTRO=REDHAT],
---
>                     [FEDORA | RHEL | CENTOS | ALMALINUX | CLOUDLINUX],[DISTRO=REDHAT],
 
 
--
Aleksandr Kravchenko