Running a2enmod gives:

bash: a2enmod: command not found

I've hunted high and low and can't find any answers. Is there something I need to do/install?

  • 2
    Have you installed apache2? – Michael Hampton Apr 25 at 16:17
  • You need to run the command as root. You can do this with sudo a2enmod ... – Torin Apr 25 at 19:04
  • I've been running the command as root and I have installed apache2. – H2ONOCK Apr 30 at 10:59

Also if you used to open your root session with "su", then after upgrading to buster make sure to use "su -" instead, otherwise some commands won't be available (including a2enmod).

  • This fixed it, nice one! – H2ONOCK Jul 10 at 17:35

You need to have installed apache2

sudo apt install apache2

and sudo a2enmod file

you can also do a symbolic link:

ln -s /rute/ /rute2/

  • He can't create a symbolic link if he's not root. And the syntax would be cd /etc/apache2/mods-enabled; ln -s ../mods-available/foo – Freddy Apr 25 at 23:05
  • I've read that I shouldn't be doing it that way and that I should be using the a2* functions instead which is why I'm trying not to revert to doing that. – H2ONOCK Apr 30 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.