Ask Your Question
0

Cannot install python mod_wsgi

asked 2016-05-03 23:09:40 -0500

jaaf64 gravatar image

updated 2016-05-03 23:59:37 -0500

I am trying to follow this tutorial http://www.python-course.eu/dynamic_w... . I am new to using python with apache and more generally in web apps. This tuto refers to libapache2-mod-python. This module is not available in Fedora. According to what I read on the web, it had been replaced with mod_python for a while, then, according to this thread https://ask.fedoraproject.org/en/ques... , with mod_wsgi.

As I am also new to Fedora, I am asking how should I interpret this sentences in the tuto:

You have to add the following lines into /etc/apache2/sites-enabled/000-default:

    AddHandler mod_python .py 

         PythonHandler mod_python.publisher 

         PythonDebug On

But, normally according to this page https://en.wikipedia.org/wiki/Mod_wsgi that says: " This (mod_wsgi) is installed as a Python module using setup.py or pip and without needing manual intervention with the Apache configuration", I should not have to intervene in the apache configuration. Nevertheless when trying to install the module with :

$ python -m pip install mod_wsgi

I got an error message telling me:

gcc: erreur : /usr/lib/rpm/redhat/redhat-hardened-cc1: Aucun fichier ou dossier de ce type error: command 'gcc' failed with exit status 1

The full output of the command is here. http://paste.fedoraproject.org/362393... Thank you for help.

edit retag flag offensive close merge delete

Comments

You could use dnf to install mod_wsgi, but it won't work the same way as that tutorial. mod_python is no longer distributed in Fedora, but it does look like there's a live fork of it on github, so you might be able to install it from there. Or find a different tutorial.

ssieb gravatar imagessieb ( 2016-05-06 15:58:33 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-07-04 12:17:46 -0500

mkovarik gravatar image

Install package that contains that file: dnf install /usr/lib/rpm/redhat/redhat-hardened-cc1

edit flag offensive delete link more

Question Tools

Stats

Asked: 2016-05-03 23:09:40 -0500

Seen: 536 times

Last updated: Jul 04 '16