Article 6NVPH mod_wsgi with Apache on Amazon Linux 2023

mod_wsgi with Apache on Amazon Linux 2023

by
taru.tarak
from LinuxQuestions.org on (#6NVPH)
Hello,

I am trying to deploy a simple Python 3.11 web application with Apache on Amazon Linux 2023 under EC2 instance. However, I am currently stuck with installing and configuring "mod_wsgi" on Amazon Linux 2023. As "mod_wsgi" is not directly available in the Amazon Linux 2023 repositories, I think it can be installed using pip and configured to use the mod_wsgi compiled from source. I have tried but getting below error:
Code:[root@]# python3.11 -m pip install mod_wsgi
Collecting mod_wsgi
Using cached mod_wsgi-5.0.0.tar.gz (497 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

i python setup.py egg_info did not run successfully.
exit code: 1
> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-5crs713j/mod-wsgi_ae7e177c58f045ac91ce06e88c4c8db3/setup.py", line 88, in <module>
raise RuntimeError('The %r command appears not to be installed or '
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.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

i Encountered error while generating package metadata.
> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
It would be very helpful if anyone could please help on this topic. Any response would be appreciated.

Thank you.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments