can't install wsgi_mod-3.3 for django on ubuntu - django

I am trying to get my web server running on Ubuntu using Apache2 in order to run my site built with Django. Following the official django docs, I successfully got the apache server to run the django app. However, I am using Python 3.3, and when I installed mod_wsgi, it was configured for the wrong python version, so the app gets a 500 internal server error and the Apache error logs show ImportError: No module named django.core.wsgi.
I am attempting to install mod_wsgi built for Python 3.3 with the following terminal commands.
mkdir ~/sources
cd ~/sources
wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
tar xvfz mod_wsgi-3.3.tar.gz
cd mod_wsgi-3.3
./configure
make
sudo make install
However, when I get to make I get an error and I am unable to continue.
~/sources/mod_wsgi-3.3$ make
/usr/bin/apxs2 -c -I/usr/include/python2.7 -DNDEBUG -D_FORTIFY_SOURCE=2 mod_wsgi.c - L/usr/lib -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm
/usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static x86_64- linux-gnu-gcc -std=gnu99 -prefer-pic -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wformat-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing - D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 - I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/include/python2.7 - DNDEBUG -D_FORTIFY_SOURCE=2 -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c: In function 'wsgi_process_socket':
mod_wsgi.c:10095:37: error: 'conn_rec' has no member named 'remote_addr'
if ((rv = apr_socket_addr_get(&c->remote_addr, APR_REMOTE, sock))
^
mod_wsgi.c:10103:27: error: 'conn_rec' has no member named 'remote_ip'
apr_sockaddr_ip_get(&c->remote_ip, c->remote_addr);
^
mod_wsgi.c:10103:41: error: 'conn_rec' has no member named 'remote_addr'
apr_sockaddr_ip_get(&c->remote_ip, c->remote_addr);
^
mod_wsgi.c: In function 'wsgi_hook_daemon_handler':
mod_wsgi.c:12742:18: error: 'conn_rec' has no member named 'remote_ip'
r->connection->remote_ip = (char *)apr_table_get(r->subprocess_env,
^
mod_wsgi.c: In function 'Auth_environ':
mod_wsgi.c:13262:10: error: 'conn_rec' has no member named 'remote_ip'
if (c->remote_ip) {
^
mod_wsgi.c:13263:18: error: 'conn_rec' has no member named 'remote_ip'
value = c->remote_ip;
^
mod_wsgi.c:13295:14: error: 'conn_rec' has no member named 'remote_addr'
rport = c->remote_addr->port;
^
mod_wsgi.c: In function 'wsgi_hook_access_checker':
mod_wsgi.c:14395:29: error: 'conn_rec' has no member named 'remote_ip'
host = r->connection->remote_ip;
^
mod_wsgi.c: At top level:
mod_wsgi.c:14697:5: warning: initialization from incompatible pointer type [enabled by default]
&wsgi_check_authorization,
^
mod_wsgi.c:14697:5: warning: (near initialization for 'wsgi_authz_provider.check_authorization') [enabled by default]
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
From the error message it looks like it is trying to use python2.7 when I want 3.3, although I don't know that this is the cause of the error.
I think that would stem from make, as it says it checked for python in /usr/bin/python and not /usr/bin/python3.3.
How can I get this to work properly?
I am running apache2, django1.6, ubuntu 13.10
EDIT
I was able to get ./configure to work by running ./configure --with-python=/usr/bin/python3.3, but now I get a different error:
~/sources/mod_wsgi-3.3$ make
/usr/bin/apxs2 -c -I/usr/include/python3.3m -DNDEBUG mod_wsgi.c -L/usr/lib - L/usr/lib/python3.3/config -lpython3.3 -lpthread -ldl -lutil -lm
/usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static x86_64- linux-gnu-gcc -std=gnu99 -prefer-pic -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wformat-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing - D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 - I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/include/python3.3m - DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c:135:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1

Instead of compiling mod_wsgi for python3.3 yourself, you could try to install the ubuntu package

Related

gcc: error: unrecognized command line option ‘-mrecord-mcount’

CentOS 7, kernel 5.12.8-1.el7.elrepo.x86_64, VirtualBox 6.1
I want to execute this command:
sudo /sbin/vboxconfig
but I get error:
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
Here content of file vbox-setup.log
Building the main VirtualBox module.
Error building the module:
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/5.12.8-1.el7.elrepo.x86_64/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j12 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make -C /usr/src/kernels/5.12.8-1.el7.elrepo.x86_64 -f /usr/src/kernels/5.12.8-1.el7.elrepo.x86_64/Makefile modules
make -f ./scripts/Makefile.build obj=/tmp/vbox.0 \
single-build= \
need-builtin=1 need-modorder=1
gcc -Wp,-MMD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-stack-check -Werror=date-time -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -fno-omit-frame-pointer -fno-pie -Wno-declaration-after-statement -I./include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV -DIPRT_WITHOUT_EFLAGS_AC_PRESERVING -DVBOX_WITH_64_BITS_GUESTS -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DMODULE -DKBUILD_BASENAME='"SUPDrv_linux"' -DKBUILD_MODNAME='"vboxdrv"' -D__KBUILD_MODNAME=kmod_vboxdrv -c -o /tmp/vbox.0/linux/SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
gcc: error: unrecognized command line option ‘-mrecord-mcount’
gcc -Wp,-MMD,/tmp/vbox.0/.SUPDrv.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-stack-check -Werror=date-time -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -fno-omit-frame-pointer -fno-pie -Wno-declaration-after-statement -I./include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV -DIPRT_WITHOUT_EFLAGS_AC_PRESERVING -DVBOX_WITH_64_BITS_GUESTS -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DMODULE -DKBUILD_BASENAME='"SUPDrv"' -DKBUILD_MODNAME='"vboxdrv"' -D__KBUILD_MODNAME=kmod_vboxdrv -c -o /tmp/vbox.0/SUPDrv.o /tmp/vbox.0/SUPDrv.c
make[3]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[3]: *** Waiting for unfinished jobs....
gcc: error: unrecognized command line option ‘-mrecord-mcount’
make[3]: *** [/tmp/vbox.0/SUPDrv.o] Error 1
make[2]: *** [/tmp/vbox.0] Error 2
make[1]: *** [__sub-make] Error 2
make: *** [vboxdrv] Error 2
CentOS 7 is shipped with gcc 4.8.5 and newer ELrepo kernels need newer gcc to compile modules. So you need to install devtoolset.
# yum -y install centos-release-scl
# yum -y install devtoolset-9
After this, patch the /usr/share/virtualbox/src/vboxhost/build_in_tmp by adding the devtoolset-9 env to the top of the file, either by copying contents of /opt/rh/devtoolset-9/enable or adding manually the following:
export INFOPATH=/opt/rh/devtoolset-9/root/usr/share/info
export LD_LIBRARY_PATH=/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib
export PATH=/opt/rh/devtoolset-9/root/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/root/bin
export PCP_DIR=/opt/rh/devtoolset-9/root
export PKG_CONFIG_PATH=/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig
export SHLVL=4
export X_SCLS=devtoolset-9
After this, run:
# /sbin/vboxconfig
# systemctl enable --now vboxdrv
And you're done!

Installing RMARIADB on CentOS 7.5

I have been trying to install RMariaDB on my CentOS server with no success. I am running R version 3.5. I keep getting error messages related to scope. The source files seem to be correct and the install has been MD5 Sum checked. The package will unpack but then fails with a non-zero exit status. I get similar error messages whether I am installing RMySQL or RMariaDB. They are both related to the my_bool variable. Specific error messages are posted below:
> install.packages("RMariaDB")
Installing package into ‘/home/cmiddlet#cgifederal.com/R/x86_64-redhat-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/RMariaDB_1.0.6.tar.gz'
Content type 'application/x-gzip' length 42903 bytes (41 KB)
==================================================
downloaded 41 KB
* installing *source* package ‘RMariaDB’ ...
** package ‘RMariaDB’ successfully unpacked and MD5 sums checked
Using mysql_config
Found mysql_config/mariadb_config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/mysql -m64
Using PKG_LIBS=-L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl
** libs
g++ -m64 -I"/usr/include/R" -DNDEBUG -I/usr/include/mysql -m64 -I"/usr/share/R/library/BH/include" -I"/usr/share/R/library/plogr/include" -I"/home/cmiddlet#cgifederal.com/R/x86_64-redhat-linux-gnu-library/3.5/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c DbConnection.cpp -o DbConnection.o
g++ -m64 -I"/usr/include/R" -DNDEBUG -I/usr/include/mysql -m64 -I"/usr/share/R/library/BH/include" -I"/usr/share/R/library/plogr/include" -I"/home/cmiddlet#cgifederal.com/R/x86_64-redhat-linux-gnu-library/3.5/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c DbResult.cpp -o DbResult.o
In file included from MariaResultPrep.h:6:0,
from DbResult.cpp:4:
MariaBinding.h:14:15: error: ‘my_bool’ was not declared in this scope
std::vector<my_bool> is_null;
^
MariaBinding.h:14:22: error: template argument 1 is invalid
std::vector<my_bool> is_null;
^
MariaBinding.h:14:22: error: template argument 2 is invalid
In file included from MariaResultPrep.h:9:0,
from DbResult.cpp:4:
MariaRow.h:18:15: error: ‘my_bool’ was not declared in this scope
std::vector<my_bool> nulls_, errors_;
^
MariaRow.h:18:22: error: template argument 1 is invalid
std::vector<my_bool> nulls_, errors_;
^
MariaRow.h:18:22: error: template argument 2 is invalid
make: *** [DbResult.o] Error 1
ERROR: compilation failed for package ‘RMariaDB’
* removing ‘/home/cmiddlet#cgifederal.com/R/x86_64-redhat-linux-gnu-library/3.5/RMariaDB’
Warning in install.packages :
installation of package ‘RMariaDB’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpwlaf35/downloaded_packages’

error: command 'gcc' failed with exit status 1 while installing matplotlib

When installing matplotlib 1.3.0, getting below error
building 'matplotlib._png' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib__png_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. -I/usr/include/libpng12 -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c src/_png.cpp -o build/temp.linux-x86_64-2.7/src/_png.o
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1781,
from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from src/_png.cpp:28:
/usr/local/lib/python2.7/site-enter code herepackages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
src/_png.cpp: In member function ‘Py::Object _png_module::write_png(const Py::Tuple&)’:
src/_png.cpp:147: error: ‘npy_PyFile_Dup’ was not declared in this scope
src/_png.cpp:243: error: ‘npy_PyFile_DupClose’ was not declared in this scope
src/_png.cpp:264: error: ‘npy_PyFile_DupClose’ was not declared in this scope
src/_png.cpp: In member function ‘PyObject* _png_module::_read_png(const Py::Object&, bool, int)’:
src/_png.cpp:329: error: ‘npy_PyFile_Dup’ was not declared in this scope
src/_png.cpp:577: error: ‘npy_PyFile_DupClose’ was not declared in this scope
error: command 'gcc' failed with exit status 1
In other post suggested to install python-dev and it is already installed on my server.
Thank you in advance
Krishna

NDK: has not been declared

I am compiling the C++ code using Android native library NDK but I am getting the following errors while trying to include the g729a.h file in g729_jni.cpp:
ERRORS:
Compile++ arm : g729_jni <= g729_jni.cpp
/usr/src/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ -MMD -MP -MF ./obj/local/armeabi/objs/g729_jni/g729_jni.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -fno-rtti -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -I/usr/src/android-ndk-r8/sources/cxx-stl/system/include -Ijni -DANDROID -O3 -Wa,--noexecstack -O2 -DNDEBUG -g -I/usr/src/android-ndk-r8/platforms/android-3/arch-arm/usr/include -c jni/g729_jni.cpp -o ./obj/local/armeabi/objs/g729_jni/g729_jni.o
In file included from jni/g729_jni.cpp:34:
jni/g729/g729a.h:70: error: 'UWord8' has not been declared
jni/g729/g729a.h:126: error: 'UWord8' has not been declared
jni/g729_jni.cpp: In function 'jint Java_org_sipdroid_codecs_G729_open(JNIEnv*, _jobject*)':
jni/g729_jni.cpp:72: error: 'UWord8' was not declared in this scope
jni/g729_jni.cpp: In function 'jint Java_org_sipdroid_codecs_G729_encode(JNIEnv*, _jobject*, _jshortArray*, jint, _jbyteArray*, jint)':
jni/g729_jni.cpp:111: error: 'UWord8' was not declared in this scope
jni/g729_jni.cpp:111: error: expected ';' before 'serial'
jni/g729_jni.cpp:125: error: 'serial' was not declared in this scope
jni/g729_jni.cpp: In function 'jint Java_org_sipdroid_codecs_G729_decode(JNIEnv*, _jobject*, _jbyteArray*, _jshortArray*, jint)':
jni/g729_jni.cpp:156: error: cannot convert 'unsigned char*' to 'int*' for argument '2' to 'void g729a_dec_process(void*, int*, Word16*, Flag)'
make: *** [obj/local/armeabi/objs/g729_jni/g729_jni.o] Error 1
I googled to try and find the reason behind this error. As C++ is case sensitive, if we make a mistake in upper and lower case, then this kind of error occurs. But I didn't make this kind of mistakes.
If you have any idea or suggestion then please guide me through that.
Thanks
UPDATE:
[root#localhost sipdroid-read-only]# /usr/src/android-ndk-r8/ndk-build V=1 APP_ABI=armeabi APP_PROJECT_PATH=. obj/local/armeabi/objs/g729_jni/g729_jni.o
make: `obj/local/armeabi/objs/g729_jni/g729_jni.o' is up to date.
Make sure your typedef.h is similar to http://siphon.googlecode.com/svn/trunk/g729a/Headers/typedef.h
Here are the steps I made to reproduce your problem:
svn checkout http://sipdroid.googlecode.com/svn/trunk/ sipdroid
cd sipdroid
sed "s/^SILK/include $(CLEAR_VARS)\\nSILK/" -i jni/Android.mk
(note that Android.mk needed a fix after line 89).
svn checkout http://siphon.googlecode.com/svn/trunk/ ../siphon
cp -d ../siphon/g729a/Headers/ jni/g729
wget http://pastie.org/pastes/4737332/download -O jni/g729/g729a.h
wget "http://sipdroid.googlecode.com/issues/attachment?aid=7963991223373796529&name=g729_jni.cpp&token=KHEZCoq6ZYSuV_VhsV8fC3uwsSs%3A1348058591979" -O jni/g729_jni.cpp
sed -e "s/g722_jni/g729_jni/" -i jni/Android.mk
ndk-build.cmd V=1 APP_ABI=armeabi APP_PROJECT_PATH=. obj/local/armeabi/objs/g729_jni/g729_jni.o
... and your file compiles with a small warning. What have you done differently?

Cant make mod_wsgi-3.3 in trying to use it with xampp and django

raz#T43:~/Downloads/mod_wsgi-3.3$ sudo ./configure --with-apxs=/opt/lampp/bin/apxs --with-python=/usr/bin/python2.6
checking Apache version... 2.2.14
configure: creating ./config.status
config.status: creating Makefile
raz#T43:~/Downloads/mod_wsgi-3.3$ sudo make
/opt/lampp/bin/apxs -c -I/usr/include/python2.6 -DNDEBUG mod_wsgi.c -L/usr/lib -L/usr/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm
/opt/lampp/build/libtool --silent --mode=compile gcc -prefer-pic -O3 -Wl,--rpath -Wl,/opt/lampp/lib -Wl,--rpath -Wl,/opt/lampp/lib/mysql -I/opt/lampp/include -L/opt/lampp/lib -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/opt/lampp/include -I/opt/lampp/include -I/opt/lampp/include -I/opt/lampp/include -I/usr/include/python2.6 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c:135: fatal error: Python.h: No such file or directory
compilation terminated.
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
I cant find what's wrong. Any one have an idea? Python seams to work in all other regards
You need to install the 'dev' package for Python installation you are using.
Error message is described in:
http://code.google.com/p/modwsgi/wiki/InstallationIssues#Missing_Python_Header_Files