2

I am trying to install mod_wsgi package using pip , in amazon linux 2 instance, but I keep facing an error:

Command:

python3 -m pip install mod_wsgi

OUTPUT/ERROR:

Defaulting to user installation because normal site-packages is not writeable
Collecting mod_wsgi
  Using cached mod_wsgi-4.9.0.tar.gz (497 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2sfljsxd/mod-wsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2sfljsxd/mod-wsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-54w0mlq7
         cwd: /tmp/pip-install-2sfljsxd/mod-wsgi/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2sfljsxd/mod-wsgi/setup.py", line 91, 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.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Steps taken trying to resolve the error:

1.I tried running python setup.py egg_info, but kept getting the error setup.py doesnt exist

2.I tried finding setup.py , using the command find . -name setup.py, but nothing was returned

How do I solve this?

PS: I know you are only supposed to ask one question at a time but, if there is any tutorial that explains how to use apache and mod_wsgi , to launch a django project on ec2 instance on aws, please do link it, would highly appreciate it

Thank you!

tyzion
  • 260
  • 1
  • 10
  • 1
    Does this answer your question? [Installing mod\_wsgi for Python3 on Ubuntu](https://stackoverflow.com/questions/30674644/installing-mod-wsgi-for-python3-on-ubuntu) – Ankit Tiwari Sep 05 '21 at 08:21

0 Answers0