HUGEPAGES is diabled by default in the Raspberry Pi Linux kernel. To enable HUGEPAGES the kernel must be recompiled.
Tested and works as expected on Raspberry Pi 4B, 400, CM4, and 5.
sudo apt update
sudo apt install -y git build-essential bc bison kmod cpio flex libncurses5-dev libelf-dev libssl-dev