Don’t run lamp.sh manually. It is called from within install.sh.
However if with installed Apache2 a2enmod is still not available, then there is something broken on a deeper level. However no change to know further without having some output.
hash -r does not help? echo $PATH contains the 6 usual locations? command -v a2enmod has no output? reboot does not help?
Starting with Debian 10 buster the way how the su command is used has been changed. By default execution of the su command no longer provides you with expected user environmental variables.
In the case of a simple switch to administrative user root by executing su with no arguments the expected root’s PATH variable is no set properly.
So running the script with sudo will not work, switching to root with su will also not work!
To make this install script work, you have to login as root.
Could a check be added to the beginning of the install script to check if the user is logged in as proper root or set additional PATH variable?
Hi, @as365n4, I saw the missing a2enmod was actually in /sbin, and I saw /sbin was not in PATH. So I manually added /sbin into PATH, then solved issue.