Lamp: a2enmod command not found

Hi,
I tried to install nextcloudpi, but faced an issue. Appreciate if anyone can help and give any advice.
What I have done:

  1. Installed Debian Buster without desktop environment.
  2. Ran curl installation : # curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash

Then I got error: lamp: a2enmod command not found.

PHP version is 7.3.

Do you have Apache installed?

Try installing apache2 first:
apt-get install apache2

Then re-run the curl installation

Hmm Apache should be installed by the script as well: https://github.com/nextcloud/nextcloudpi/blob/master/lamp.sh
Perhaps something failed with this. Check the scripts output where this should have happened.

Otherwise maybe @nachoparker might be able to help.

Thanks for your advice. Apache2 is already installed. I tried rerun it, and reinstall it, but same outcome, still a2enmod not found.

Thanks for your advice. I tried using curl to run lamp.sh, still no success. I didn’t save the output.

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?

Thanks @Michalng, echo $PATH is the point, I saw /sbin was not in the PATH. Now the problem is solved.