Hello Dai
You can try to update the versions of those dependencies and run the script again. It seems that these versions of Wazuh package have been somewhat outdated, surely certain updates of the operating systems have modified the dependencies that Wazuh needs to compile.
Try to update them and try again, if you still encounter problems, send me the logs you find and I will be happy to help you.
If necessary, send me also the Dockerfile you are using to make it easier to reproduce the error in local environments.
Regards
Jose