• Home
  • 2018
  • September

Solve: The ‘apxs’ command appears not to be installed or is not executable

This error happened while installing mod_wsgi library in a virtualenv when the virtualenv was activated after running the server in a normal python environment:

Collecting mod-wsgi==4.6.4
  Downloading https://files.pythonhosted.org/packages/9e/37/dd336068ece37c43957aa337f25c59a9a6afa98086e5507908a2d21ab807/mod_wsgi-4.6.4.tar.gz (2.6MB)
    100% |████████████████████████████████| 2.6MB 280kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-8bm00g4v/mod-wsgi/setup.py", line 168, in <module>
        'missing Apache httpd server packages.' % APXS)
    RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-8bm00g4v/mod-wsgi/


sudo apt-get install python3-pip apache2 libapache2-mod-wsgi-py3 apache2-dev
pip3 install mod_wsgi