I have /usr/local/directadmin/custombuild/custom/modsecurity/conf which is a cpguard modsecurity configuration. I tried removing it and compiling without anything in custom but the same error happens
While building ModSecurity and PHP on AlmaLinux 9, I ran into the same issue. Here's the solution I used to get a fresh version of libkeyutils and resolve the problem:
Code:
git clone https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git
cd keyutils
make
make install
Once compilation is complete, you can proceed with running custombuild to test ModSecurity and PHP integration.
Bash:
da build modsecurity
da build php
However, if you run "da build all" again, the issue is likely to resurface, presumably because the DirectAdmin build process reinstalls its bundled version of libkeyutils, overwriting your custom build.