26

I'm trying to rebuild mod_wsgi and am running into this issue? Does anyone know what's going on here?

/tmp/mod_wsgi-3.4# ls
config.log     LICENCE           posix-ap2X.mk.in   win32-ap22py31.mk
config.status  Makefile.in       README
configure      mod_wsgi.c        win32-ap22py26.mk
configure.ac   posix-ap1X.mk.in  win32-ap22py27.mk
root@vps-547073:/tmp/mod_wsgi-3.4# ./configure
checking for apxs2... no
checking for apxs... no
checking Apache version... ./configure: line 1704: apxs: command not found
./configure: line 1704: apxs: command not found
./configure: line 1705: apxs: command not found
./configure: line 1708: /: Is a directory

checking for python... /usr/bin/python
./configure: line 1877: apxs: command not found
configure: creating ./config.status
config.status: error: cannot find input file: Makefile.in

2 Answers 2

40

See the mod_wsgi instructions:

It says:

On Linux systems, if Apache has been installed from a package repository, you must have installed the corresponding Apache "dev" package as well.

For most Linux distributions, the "dev" package for Apache 2.X is "apache2-dev" where the corresponding Apache package was "apache2". Some systems however distinguish the "dev" package based on which MPM is used by Apache. As such, it may also be called "apache2-worker-dev" or "apache2-prefork-dev". If using Apache 2.X, do not mix things up and install "apache-dev" by mistake, which is the "dev" package for Apache 1.3 called just "apache".

You are missing that dev package for Apache. This is why 'apxs' cannot be found and subsequent issues occur.

3
  • A stupid question, I know, but where would I find the appropriate name for the package on a different distro? Specifically, on the amazon web services brand of linux?
    – dwanderson
    Feb 3, 2014 at 23:01
  • Thank you, this solved my problem trying to pip install mod_wsgi in virtualenv in Linux Mint 17 Cinnamon. Nov 25, 2014 at 17:34
  • Your answer was correct and helped me and no offence, but your profile picture freaks me out :D Jan 27, 2015 at 10:18
33

Try to install apache-dev. Use below command in terminal to install.

sudo yum install httpd-devel

OR

Ubuntu/Debian: sudo apt-get install apache2-dev

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.