mod_wsgi: RuntimeError: The 'apxs' command appears not to be installed or is not executable

Short transcript:

First I make a new virtualenv:

$ virtualenv .vx
Ignoring indexes: https://pypi.python.org/simple
Collecting pip
Collecting setuptools
Installing collected packages: setuptools, pip


Successfully installed pip-6.0.8 setuptools-14.3.1

Then I install the httpd package:

$ .vx/bin/pip install mod_wsgi-httpd
Collecting mod-wsgi-httpd
  Using cached mod_wsgi-httpd-2.4.12.4.tar.gz
    apr-1.5.1/
    apr-1.5.1/libapr.mak
    apr-1.5.1/apr.mak
    apr-1.5.1/apr.spec

...
... lots of output ...
...

    adding  httpd/modules/mod_env.so
    adding  httpd/modules/mod_mime.so
    adding  httpd/modules/mod_status.so
    adding  httpd/__init__.py
    building 'mod_wsgi_packages.apxs._dummy' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c _module.c -o build/temp.linux-x86_64-2.7/_module.o
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/_module.o -o build/lib.linux-x86_64-2.7/mod_wsgi_packages/apxs/_dummy.so
    Installing mod_wsgi-apxs script to /home/ionel/test/.vx/bin
Successfully installed mod-wsgi-httpd-2.4.12.4

Looks fine.

But then mod_wsgi package can’t find the apxs bin:

$ .vx/bin/pip install mod_wsgi
Collecting mod-wsgi
  Using cached mod_wsgi-4.4.10.tar.gz
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-Dmw1DB/mod-wsgi/setup.py", line 140, 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.
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

      File "<string>", line 20, in <module>

      File "/tmp/pip-build-Dmw1DB/mod-wsgi/setup.py", line 140, 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-build-Dmw1DB/mod-wsgi

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Sorry to bump an old thread, but for others coming here from Google - make sure you have apache2-dev installed as well as apache2. Massive facepalm.

@Sudheertati Please create new issues rather than adding to an existing closed issue.

Also ensure you have installed the apache/httpd devel package for your system as explained in the system requirements at:

That is what the error message is telling you is missing.

Your operating system setup also appears to have a problem with it as well, in that it is missing Python packages used by apport system for reporting errors. You should separately resolve that as well.

If you need further help, please create a new issue first with details and what steps you have tried to resolve the error.

Believe fixed in ‘develop’ branch. Can try following to verify now works for you:

.vx/bin/pip uninstall mod_wsgi
.vx/bin/pip install https://github.com/GrahamDumpleton/mod_wsgi/archive/develop.zip