Error "ModuleNotFoundError: No module named 'selinux'" on install

Bug Report Template

Description

When installing ApisCP using the script, soon after reboot this error occur:

“TASK [system/selinux : Change SELinux security policy] *************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named ‘selinux’
fatal: [localhost]: FAILED! => changed=false
msg: Failed to import the required Python library (libselinux-python) on stxdi-websrv-01’s Python /usr/bin/python3.12. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter”

Steps to Reproduce

Executing the command “cd /usr/local/apnscp/resources/playbooks && env ANSIBLE_LOG_PATH=/root/apnscp-bootstrapper.log BOOTSTRAP_SH=/root/resume_apnscp_setup.sh ansible-playbook -l localhost -c local bootstrap.yml”

Environment

ApisCP version: cpcmd misc:cp-version
Operating System: uname -r - Almalinux 8 - 4.18.0-553.40.1.el8_10.aarch64

ARM64 is not supported. x86-64 architecture only.

Further, default Python interpreter that ships with Alma is 3.11 for x86-64 platforms and 3.6 for ARM64 as of Alma 8.10. 3.12 is a non-system default likely from AppStream which lacks system SELinux bindings as well (python3-libselinux RPM).

1 Like

Thanks for the info!

So they need to update this in the Docs - Installation | ApisCP Docs. There´s no mention of ARM64 being unsupported.