mod_wsgi no module error

495 views
Skip to first unread message

MMRUser

unread,
Apr 13, 2010, 8:17:36 AM4/13/10
to modwsgi
I'm getting this error on my server log.... I have two versions of
Python 2.4 and 2.5 Django is installed in to 2.6 and it's the default
python on my system, also it can be imported through command line..

I tried then it raised no module name os
WSGIPythonHome /usr/local

[Tue Apr 13 12:04:44 2010] [error] Exception exceptions.ImportError:
'No module named ate$
'import site' failed; use -v for traceback
Fatal Python error: unexpected exception during garbage collection
[Tue Apr 13 12:04:44 2010] [notice] caught SIGTERM, shutting down
[Tue Apr 13 12:04:44 2010] [notice] suEXEC mechanism enabled
(wrapper: /usr/sbin/suexec)
[Tue Apr 13 12:04:44 2010] [warn] module wsgi_module is already
loaded, skipping
[Tue Apr 13 12:04:44 2010] [notice] Digest: generating secret for
digest authentication .$
[Tue Apr 13 12:04:44 2010] [notice] Digest: done
[Tue Apr 13 12:04:44 2010] [notice] Apache/2.2.3 (Red Hat) configured
-- resuming normal $
[Tue Apr 13 12:09:03 2010] [error] [client 127.0.0.1] Directory index
forbidden by Option$
[Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] mod_wsgi
(pid=24108): Target WSGI s$
[Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] mod_wsgi
(pid=24108): Exception occ$
[Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] File "/var/www/
html/testproject/a$
[Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] import
django.core.handlers.wsgi
[Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] ImportError: No
module named django$

Graham Dumpleton

unread,
Apr 13, 2010, 8:49:22 AM4/13/10
to mod...@googlegroups.com
On 13 April 2010 22:17, MMRUser <oshadh...@gmail.com> wrote:
> I'm getting this error on my server log.... I have two versions of
> Python 2.4 and 2.5 Django is installed in to 2.6 and it's the default
> python on my system, also it can be imported through command line..
>
> I tried then it raised no module name os
> WSGIPythonHome /usr/local
>
> [Tue Apr 13 12:04:44 2010] [error] Exception exceptions.ImportError:
> 'No module named ate$
> 'import site' failed; use -v for traceback

There is no Python installation under /usr/local of the version that
mod_wsgi has been compiled against.

Run:

ldd mod_wsgi.so

on the .so file that was generated by built process to work out which
Python it was compiled against. It possibly isn't the version you want
to use.

> Fatal Python error: unexpected exception during garbage collection
> [Tue Apr 13 12:04:44 2010] [notice] caught SIGTERM, shutting down
> [Tue Apr 13 12:04:44 2010] [notice] suEXEC mechanism enabled
> (wrapper: /usr/sbin/suexec)
> [Tue Apr 13 12:04:44 2010] [warn] module wsgi_module is already
> loaded, skipping

You have duplicate LoadModule lines for mod_wsgi. Either you have
listed it twice by accident, or your snippet configuration file is
being included more than once for some reason.

Graham

> [Tue Apr 13 12:04:44 2010] [notice] Digest: generating secret for
> digest authentication .$
> [Tue Apr 13 12:04:44 2010] [notice] Digest: done
> [Tue Apr 13 12:04:44 2010] [notice] Apache/2.2.3 (Red Hat) configured
> -- resuming normal $
> [Tue Apr 13 12:09:03 2010] [error] [client 127.0.0.1] Directory index
> forbidden by Option$
> [Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] mod_wsgi
> (pid=24108): Target WSGI s$
> [Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] mod_wsgi
> (pid=24108): Exception occ$
> [Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] Traceback (most
> recent call last):
> [Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1]   File "/var/www/
> html/testproject/a$
> [Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1]     import
> django.core.handlers.wsgi
> [Tue Apr 13 12:09:14 2010] [error] [client 127.0.0.1] ImportError: No
> module named django$
>

> --
> You received this message because you are subscribed to the Google Groups "modwsgi" group.
> To post to this group, send email to mod...@googlegroups.com.
> To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
>
>

MMRUser

unread,
Apr 13, 2010, 9:23:16 AM4/13/10
to modwsgi
ldd mod_wsgi.so out puts :

libpython2.4.so.1.0 => /usr/lib64/libpython2.4.so.1.0
(0x00002b6f95177000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b6f954a9000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b6f956c4000)
libutil.so.1 => /lib64/libutil.so.1 (0x00002b6f958c9000)
libm.so.6 => /lib64/libm.so.6 (0x00002b6f95acc000)
libc.so.6 => /lib64/libc.so.6 (0x00002b6f95d4f000)
/lib64/ld-linux-x86-64.so.2 (0x0000003aaec00000)

seems like it's the older version how to correct this one, I used the
rpm "mod_wsgi-3.2-1.el5.x86_64.rpm" to install mos_wsgi is that the
wrong rpm ?..

System:
Redhat Enterprise Linux 5.4 (64bit)

On Apr 13, 6:49 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:

Clodoaldo Neto

unread,
Apr 13, 2010, 9:54:43 AM4/13/10
to mod...@googlegroups.com
2010/4/13 MMRUser <oshadh...@gmail.com>:

> ldd mod_wsgi.so out puts :
>
>        libpython2.4.so.1.0 => /usr/lib64/libpython2.4.so.1.0
> (0x00002b6f95177000)
>        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b6f954a9000)
>        libdl.so.2 => /lib64/libdl.so.2 (0x00002b6f956c4000)
>        libutil.so.1 => /lib64/libutil.so.1 (0x00002b6f958c9000)
>        libm.so.6 => /lib64/libm.so.6 (0x00002b6f95acc000)
>        libc.so.6 => /lib64/libc.so.6 (0x00002b6f95d4f000)
>        /lib64/ld-linux-x86-64.so.2 (0x0000003aaec00000)
>
> seems like it's the older version how to correct this one, I used the
> rpm "mod_wsgi-3.2-1.el5.x86_64.rpm" to install mos_wsgi is that the
> wrong rpm ?..

If you got it from http://codepoint.net/attachments/mod_wsgi then it
is built against the default Python install: 2.4

BTW what is so special about Python 2.5/2.6 that some people must
prove to the world that their servers run it? The Django site says it
works with Python 2.4. Redhat 5 as it is can run for years without a
single glitch and I think that is the main goal for a production
server, stability. Why would someone want to screw that and ask for a
life of trouble? If their applications where that demanding they would
not be running Django or any other morbidly obese framework. Why not
just shift the server maintenance effort to application development?
The application users will never know what Python version they are
running or any other technical details.

I don't know where people is getting the advice to upgrade Python. I
think it is plain wrong, especially for not experienced server admins.

Regards, Clodoaldo

MMRUser

unread,
Apr 13, 2010, 10:22:51 AM4/13/10
to modwsgi
So is there any way getting around this, I need python 2.6 for some
dependency reasons (with some packages require)..

On Apr 13, 7:54 pm, Clodoaldo Neto <clodoaldo.pi...@gmail.com> wrote:
> 2010/4/13 MMRUser <oshadha.ro...@gmail.com>:


>
> > ldd mod_wsgi.so out puts :
>
> >        libpython2.4.so.1.0 => /usr/lib64/libpython2.4.so.1.0
> > (0x00002b6f95177000)
> >        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b6f954a9000)
> >        libdl.so.2 => /lib64/libdl.so.2 (0x00002b6f956c4000)
> >        libutil.so.1 => /lib64/libutil.so.1 (0x00002b6f958c9000)
> >        libm.so.6 => /lib64/libm.so.6 (0x00002b6f95acc000)
> >        libc.so.6 => /lib64/libc.so.6 (0x00002b6f95d4f000)
> >        /lib64/ld-linux-x86-64.so.2 (0x0000003aaec00000)
>
> > seems like it's the older version how to correct this one, I used the
> > rpm "mod_wsgi-3.2-1.el5.x86_64.rpm" to install mos_wsgi is that the
> > wrong rpm ?..
>

> If you got it fromhttp://codepoint.net/attachments/mod_wsgithen it

Carl Nobile

unread,
Apr 13, 2010, 10:40:37 AM4/13/10
to mod...@googlegroups.com
You will have to recompile all the dependencies that use python
yourself. DO NOT use RPM packages, this includes mod_wsgi. REMOVE all
python dependent RPMs from your system and download the source and
start compiling everything. There may not be all that many, you may
only need to compile mod_wsgi depending on what you have installed.
Make sure you do not have mod_python installed anywhere on the box.

~Carl

--
-------------------------------------------------------------------------------
Carl J. Nobile (Software Engineer)
carl....@gmail.com
-------------------------------------------------------------------------------

MMRUser

unread,
Apr 13, 2010, 11:43:09 AM4/13/10
to modwsgi
Ok i'll give a try..

> > For more options, visit this group athttp://groups.google.com/group/modwsgi?hl=en.


>
> --
> -------------------------------------------------------------------------------
> Carl J. Nobile (Software Engineer)

> carl.nob...@gmail.com
> -------------------------------------------------------------------------------

Carl Nobile

unread,
Apr 13, 2010, 12:26:56 PM4/13/10
to mod...@googlegroups.com
You still need to have apxs installed with RPMs if they don't depend
on python themselves. Yes mod_wsgi depends on apxs, but apxs does not
depend on python from what I can tell.

You only need to compile packages that themselves depend on python if
you are changing from python v2.4 to 2.6.

~Carl

**** Your post from the other issues. Please use this one. ****

I just as a test I tried to compile it and gives me this error

# ./configure --with-python=/usr/local/bin/python2.6
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

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

> For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
>
>

--
-------------------------------------------------------------------------------
Carl J. Nobile (Software Engineer)

carl....@gmail.com
-------------------------------------------------------------------------------

MMRUser

unread,
Apr 13, 2010, 12:56:10 PM4/13/10
to modwsgi
Do you know where I can get the proper apxs packages + RPMs, it's not
in the redhat PM (tried with yum).

Carl Nobile

unread,
Apr 13, 2010, 1:18:43 PM4/13/10
to mod...@googlegroups.com
You will have to hunt for it, but here is a download link. Also, if
apxs2 or apxs have any dependencies of their own you will have to
install the RPM for those also. You will know if they complain when
you install them.

http://rpmfind.net/linux/RPM/index.html

~Carl

> For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
>
>

--
-------------------------------------------------------------------------------
Carl J. Nobile (Software Engineer)

carl....@gmail.com
-------------------------------------------------------------------------------

MMRUser

unread,
Apr 13, 2010, 1:26:05 PM4/13/10
to modwsgi
Once more question how do I remove mod wsgi, that I previously
installed using rpm (mod_wsgi-3.2-1.el5.x86_64.rpm).Can't I just
remove the "mod_wsgi.so" in apache's modules..?

Carl Nobile

unread,
Apr 13, 2010, 2:31:26 PM4/13/10
to mod...@googlegroups.com
Yes, but it will bite you in the butt later if you don't remove the RPM.

# rpm -e <package name>

To find the package name for the above:

# rpm -qa | grep mod_wsgi

I haven't used these commands in many years because I use a Debian
derived distribution now which uses apt_get or aptitude.

Hope this works for you.

~Carl

> For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
>
>

--
-------------------------------------------------------------------------------
Carl J. Nobile (Software Engineer)

carl....@gmail.com
-------------------------------------------------------------------------------

Graham Dumpleton

unread,
Apr 13, 2010, 10:04:53 PM4/13/10
to mod...@googlegroups.com
On 14 April 2010 00:40, Carl Nobile <carl....@gmail.com> wrote:
> You will have to recompile all the dependencies that use python
> yourself. DO NOT use RPM packages, this includes mod_wsgi. REMOVE all
> python dependent RPMs from your system and download the source and
> start compiling everything. There may not be all that many, you may
> only need to compile mod_wsgi depending on what you have installed.
> Make sure you do not have mod_python installed anywhere on the box.

It should be made very clear that one should not remove the default
Python that the operating system ships with. This is because as I
understand it RedHat has various system tools which rely on that
specific version and removing it will cause them to break.

Someone can correct me, but my understanding is that RPMs available from:

http://iuscommunity.org/packages/

allow one to install both Python and mod_wsgi in such a way as to not
conflict with the operating system Python installation. Specifically,
the RPM for mod_wsgi is dependent on a IUS Python RPM which doesn't
clash with the system one and is installed into different area.

http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/SRPMS/repoview/python26.html
http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/SRPMS/repoview/mod_wsgi-python26.html

Graham

MMRUser

unread,
Apr 14, 2010, 12:27:57 AM4/14/10
to modwsgi
New problem arises, I tried to install apxs 2 (http://rpm.pbone.net/
index.php3/stat/4/idpl/4434034/com/apache-apxs-2.2.4-1.i386.rpm.html)
an as a dependency it requires perl-base (http://rpm.pbone.net/
index.php3/stat/4/idpl/12070642/dir/redhat_el_5/com/perl-
base-2.12-1.el5.rf.noarch.rpm.html) I installed it, but when I run the
apxs still it gives me an error

warning: apache-apxs-2.2.4-1.i386.rpm: Header V3 DSA signature:
NOKEY, key ID 1bbd5459
error: Failed dependencies:
perl-base >= 0:5.004 is needed by apache-apxs-2.2.4-1.i386


On Apr 14, 8:04 am, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:


> On 14 April 2010 00:40, Carl Nobile <carl.nob...@gmail.com> wrote:
>
> > You will have to recompile all the dependencies that use python
> > yourself. DO NOT use RPM packages, this includes mod_wsgi. REMOVE all
> > python dependent RPMs from your system and download the source and
> > start compiling everything. There may not be all that many, you may
> > only need to compile mod_wsgi depending on what you have installed.
> > Make sure you do not have mod_python installed anywhere on the box.
>
> It should be made very clear that one should not remove the default
> Python that the operating system ships with. This is because as I
> understand it RedHat has various system tools which rely on that
> specific version and removing it will cause them to break.
>
> Someone can correct me, but my understanding is that RPMs available from:
>
>  http://iuscommunity.org/packages/
>
> allow one to install both Python and mod_wsgi in such a way as to not
> conflict with the operating system Python installation. Specifically,
> the RPM for mod_wsgi is dependent on a IUS Python RPM which doesn't
> clash with the system one and is installed into different area.
>

> http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/SRPMS/repoview/pyt...http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/SRPMS/repoview/mod...
>
> Graham
>
> > ~Carl

> >> For more options, visit this group athttp://groups.google.com/group/modwsgi?hl=en.


>
> > --
> > -------------------------------------------------------------------------------
> > Carl J. Nobile (Software Engineer)

> > carl.nob...@gmail.com

Graham Dumpleton

unread,
Apr 14, 2010, 12:35:17 AM4/14/10
to mod...@googlegroups.com
Unless they package it strangely, you wouldn't need to install a
separate 'apxs' package, it should be part of Apache dev package.

Has RedHat split 'apxs' out of the Apache development package?

Anyone know?

Graham

MMRUser

unread,
Apr 14, 2010, 1:25:49 AM4/14/10
to modwsgi
I installed apache with yum.. and I'm not sure whether it split apxs,
even it split apxs from within the installation it should be in my
system correct me if I'm wrong.. and mod_wsgi should detect it.
Should I install apache-devel package it includes apxs see here:http://
rpm.pbone.net/index.php3/stat/6/idpl/3383565/dir/redhat_5.x/com/apache-
devel-1.3.4-1.i386.rpm

/usr/sbin/apxs

On Apr 14, 10:35 am, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:


> Unless they package it strangely, you wouldn't need to install a
> separate 'apxs' package, it should be part of Apache dev package.
>
> Has RedHat split 'apxs' out of the Apache development package?
>
> Anyone know?
>
> Graham
>

> >>http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/SRPMS/repoview/pyt......

Graham Dumpleton

unread,
Apr 14, 2010, 1:47:55 AM4/14/10
to mod...@googlegroups.com
On 14 April 2010 15:25, MMRUser <oshadh...@gmail.com> wrote:
> I installed apache with yum.. and I'm not sure whether it split apxs,
> even it split apxs from within the installation it should be in my
> system correct me if I'm wrong.. and mod_wsgi should detect it.
> Should I install apache-devel package it includes apxs see here:http://
> rpm.pbone.net/index.php3/stat/6/idpl/3383565/dir/redhat_5.x/com/apache-
> devel-1.3.4-1.i386.rpm
>
> /usr/sbin/apxs

You have to have apache-devel anyway.

Sounds like you should remove that other apxs package, then install
apache-devel.

The apache-devel package may still probably want some version of perl
for apxs to run.

Don't you have any perl version installed?

Graham

MMRUser

unread,
Apr 14, 2010, 2:25:41 AM4/14/10
to modwsgi
I installed httpd-devel using rpm and again it's gives me that earlier
error.. now removed httpd-devel, as the wiki says I think ./configure
looks apxs in wrong location and I can't find the apxs in my system
too.The apache (httpd) installation is in /etc/httpd

On Apr 14, 11:47 am, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:

> ...
>
> read more »

MMRUser

unread,
Apr 14, 2010, 2:32:40 AM4/14/10
to modwsgi
Install http-devel again here's the error..

./configure --with-python=/usr/local/bin/python
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking Apache version... apxs:Warning: /usr/bin/httpd not found or
not executable
apxs:Warning: Continuing anyway...
apxs:Warning: No shared object support for Apache
apxs:Warning: available under your platform. Make sure
apxs:Warning: the Apache module mod_so is compiled into
apxs:Warning: your server binary `/usr/bin/httpd'.
apxs:Warning: Continuing anyway...
apxs:Warning: /usr/bin/httpd not found or not executable
apxs:Warning: Continuing anyway...
apxs:Warning: No shared object support for Apache
apxs:Warning: available under your platform. Make sure
apxs:Warning: the Apache module mod_so is compiled into
apxs:Warning: your server binary `/usr/bin/httpd'.
apxs:Warning: Continuing anyway...
apxs:Warning: /usr/bin/httpd not found or not executable
apxs:Warning: Continuing anyway...
apxs:Warning: No shared object support for Apache
apxs:Warning: available under your platform. Make sure
apxs:Warning: the Apache module mod_so is compiled into
apxs:Warning: your server binary `/usr/bin/httpd'.
apxs:Warning: Continuing anyway...
1.X
apxs:Warning: /usr/bin/httpd not found or not executable
apxs:Warning: Continuing anyway...
apxs:Warning: No shared object support for Apache
apxs:Warning: available under your platform. Make sure
apxs:Warning: the Apache module mod_so is compiled into
apxs:Warning: your server binary `/usr/bin/httpd'.
apxs:Warning: Continuing anyway...
configure: creating ./config.status
config.status: creating Makefile

make
/usr/sbin/apxs -c -I/usr/local/include/python2.6 -DNDEBUG mod_wsgi.c
-L/usr/local/lib -L/usr/local/lib/python2.6/config -lpython2.6 -
lpthread -ldl -lutil -lm
apxs:Warning: /usr/bin/httpd not found or not executable
apxs:Warning: Continuing anyway...
apxs:Warning: No shared object support for Apache
apxs:Warning: available under your platform. Make sure
apxs:Warning: the Apache module mod_so is compiled into
apxs:Warning: your server binary `/usr/bin/httpd'.
apxs:Warning: Continuing anyway...
gcc -O2 -m486 -fno-strength-reduce -DLINUX=2 -DUSE_EXPAT -I../lib/
expat-lite -fpic -DSHARED_MODULE -I/usr/include/apache -I/usr/local/
include/python2.6 -DNDEBUG -c mod_wsgi.c
mod_wsgi.c: In function âwsgi_hook_interceptâ:
mod_wsgi.c:7989: error: âAP_MAX_REG_MATCHâ undeclared (first use in
this function)
mod_wsgi.c:7989: error: (Each undeclared identifier is reported only
once
mod_wsgi.c:7989: error: for each function it appears in.)
apxs:Break: Command failed with rc=1
make: *** [mod_wsgi.so] Error 1


On Apr 14, 11:47 am, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:

> ...
>
> read more »

Graham Dumpleton

unread,
Apr 14, 2010, 2:43:39 AM4/14/10
to mod...@googlegroups.com
You installed the wrong Apache development version. You installed it
for Apache 1.3. The version you install must match that for Apache you
have installed, which appears to be 2.2.4.

Graham

MMRUser

unread,
Apr 14, 2010, 3:33:52 AM4/14/10
to modwsgi
New error

make
/usr/sbin/apxs -c -I/usr/local/include/python2.6 -DNDEBUG mod_wsgi.c
-L/usr/local/lib -L/usr/local/lib/python2.6/config -lpython2.6 -
lpthread -ldl -lutil -lm

/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-
protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-
aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/
httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/local/
include/python2.6 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch
mod_wsgi.slo
mod_wsgi.c: In function 'wsgi_server_group':
mod_wsgi.c:949: warning: unused variable 'value'
mod_wsgi.c: In function 'Log_writelines':
mod_wsgi.c:1732: warning: unused variable 'msg'
mod_wsgi.c: In function 'Adapter_output':
mod_wsgi.c:3010: warning: unused variable 'n'
mod_wsgi.c: In function 'Adapter_file_wrapper':
mod_wsgi.c:4024: warning: unused variable 'result'
mod_wsgi.c: In function 'wsgi_python_term':
mod_wsgi.c:5631: warning: unused variable 'tstate'
mod_wsgi.c:5630: warning: unused variable 'interp'
mod_wsgi.c: In function 'wsgi_python_child_init':
mod_wsgi.c:6760: warning: unused variable 'l'
mod_wsgi.c:6658: warning: unused variable 'interp'
mod_wsgi.c: In function 'wsgi_add_import_script':
mod_wsgi.c:7411: warning: unused variable 'error'
mod_wsgi.c: In function 'wsgi_add_handler_script':
mod_wsgi.c:7859: warning: unused variable 'dconfig'
mod_wsgi.c:7858: warning: unused variable 'sconfig'
mod_wsgi.c: In function 'wsgi_hook_handler':
mod_wsgi.c:8905: warning: suggest parentheses around assignment used
as truth value
mod_wsgi.c:8907: warning: suggest parentheses around assignment used
as truth value
mod_wsgi.c:8909: warning: suggest parentheses around assignment used
as truth value
mod_wsgi.c:8913: warning: suggest parentheses around assignment used
as truth value
mod_wsgi.c:8933: warning: suggest parentheses around assignment used
as truth value
mod_wsgi.c:8935: warning: suggest parentheses around assignment used
as truth value
mod_wsgi.c:8938: warning: suggest parentheses around assignment used
as truth value
mod_wsgi.c: In function 'wsgi_daemon_worker':
mod_wsgi.c:10227: warning: unused variable 'duration'
mod_wsgi.c:10226: warning: unused variable 'start'
mod_wsgi.c: In function 'wsgi_hook_daemon_handler':
mod_wsgi.c:12423: warning: unused variable 'i'
mod_wsgi.c:12421: warning: unused variable 'elts'
mod_wsgi.c:12420: warning: unused variable 'head'
mod_wsgi.c: At top level:
mod_wsgi.c:7824: warning: 'wsgi_set_user_authoritative' defined but
not used
mod_wsgi.c:14338: warning: 'wsgi_hook_check_user_id' defined but not
used
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o
mod_wsgi.la -rpath /usr/lib64/httpd/modules -module -avoid-version
mod_wsgi.lo -L/usr/local/lib -L/usr/local/lib/python2.6/config -


lpython2.6 -lpthread -ldl -lutil -lm

/usr/bin/ld: /usr/local/lib/libpython2.6.a(node.o): relocation
R_X86_64_32 against `a local symbol' can not be used when making a
shared object; recompile with -fPIC
/usr/local/lib/libpython2.6.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1

On Apr 14, 12:43 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:


> You installed the wrong Apache development version. You installed it
> for Apache 1.3. The version you install must match that for Apache you
> have installed, which appears to be 2.2.4.
>
> Graham
>

> ...
>
> read more »

MMRUser

unread,
Apr 14, 2010, 4:37:37 AM4/14/10
to modwsgi
Found the answer wiki, so I need to re-compile Python2.6 for 64 bit.
can someone please tell me the syntax..

./configure --enable-shared CXFLAGS -m64 or

./configure --enable-shared CFLAGS -m64

> ...
>
> read more »

Graham Dumpleton

unread,
Apr 14, 2010, 5:17:01 AM4/14/10
to mod...@googlegroups.com
On 14 April 2010 18:37, MMRUser <oshadh...@gmail.com> wrote:
> Found the answer wiki, so I need to re-compile Python2.6 for 64 bit.
> can someone please tell me the syntax..
>
> ./configure --enable-shared CXFLAGS -m64 or
>
> ./configure --enable-shared CFLAGS -m64

As far as I know you just need:

./configure --enable-shared

It should automatically compile as 64 bit if the system is.

For reference of others, the issue was documented in:

http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bit_And_64_Bit_Packages

Graham

MMRUser

unread,
Apr 14, 2010, 6:06:22 AM4/14/10
to modwsgi
Finally........ I managed to installed it but still I'm getting an
error when I try to start the server..that shared library thing

on line 200 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/
modules/mod_wsgi.so into server: libpython2.6.so.1.0: cannot open
shared object file: No such file or directory

this file is in my /usr/local/lib/libpython2.6.so.1.0

so as the wiki said I would a create a symlink to this file?

On Apr 14, 3:17 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:


> On 14 April 2010 18:37, MMRUser <oshadha.ro...@gmail.com> wrote:
>
> > Found the answer wiki, so I need to re-compile Python2.6 for 64 bit.
> > can someone please tell me the syntax..
>
> > ./configure --enable-shared CXFLAGS -m64 or
>
> > ./configure --enable-shared CFLAGS -m64
>
> As far as I know you just need:
>
>   ./configure --enable-shared
>
> It should automatically compile as 64 bit if the system is.
>
> For reference of others, the issue was documented in:
>

>  http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bi...

> ...
>
> read more »

Graham Dumpleton

unread,
Apr 14, 2010, 6:19:25 AM4/14/10
to mod...@googlegroups.com
The directory /usr/local/lib isn't in standard search path.

Easiest way to work around that is to go into mod_wsgi source code and do:

make clean
LD_RUN_PATH=/usr/local/lib make
sudo make install

The LD_RUN_PATH environment variable being set when running make
causes that directory to be embedded into .so file when built so
doesn't have to be dyanmically set at run time using LD_LIBRARY_PATH.

Graham

MMRUser

unread,
Apr 14, 2010, 6:34:23 AM4/14/10
to modwsgi
Within which file this "LD_RUN_PATH=/usr/local/lib" available.. ?


On Apr 14, 4:19 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:


> The directory /usr/local/lib isn't in standard search path.
>
> Easiest way to work around that is to go into mod_wsgi source code and do:
>
>   make clean
>   LD_RUN_PATH=/usr/local/lib make
>   sudo make install
>
> The LD_RUN_PATH environment variable being set when running make
> causes that directory to be embedded into .so file when built so
> doesn't have to be dyanmically set at run time using LD_LIBRARY_PATH.
>
> Graham
>

> ...
>
> read more »

Graham Dumpleton

unread,
Apr 14, 2010, 6:37:21 AM4/14/10
to mod...@googlegroups.com
On 14 April 2010 20:34, MMRUser <oshadh...@gmail.com> wrote:
> Within which file this "LD_RUN_PATH=/usr/local/lib" available.. ?

It is not a command, you are setting the environment variable. I just
did it as part of the one command line so only applied to the
invocation of make.

The following is equivalent:

LD_RUN_PATH=/usr/local/lib
export LD_RUN_PATH
make
unsetenv LD_RUN_PATH

Graham

MMRUser

unread,
Apr 14, 2010, 8:49:40 AM4/14/10
to modwsgi
Phew ..! it's working :):), what I did was delete the libpython2.6.so
and recompile from the scratch..

BIG THANK FOR YOUR HELP....!

On Apr 14, 4:19 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:


> The directory /usr/local/lib isn't in standard search path.
>
> Easiest way to work around that is to go into mod_wsgi source code and do:
>
>   make clean
>   LD_RUN_PATH=/usr/local/lib make
>   sudo make install
>
> The LD_RUN_PATH environment variable being set when running make
> causes that directory to be embedded into .so file when built so
> doesn't have to be dyanmically set at run time using LD_LIBRARY_PATH.
>
> Graham
>

> ...
>
> read more »

Graham Dumpleton

unread,
Apr 14, 2010, 7:45:23 PM4/14/10
to mod...@googlegroups.com
On 14 April 2010 22:49, MMRUser <oshadh...@gmail.com> wrote:
> Phew ..! it's working :):), what I did was delete the libpython2.6.so
> and recompile from the scratch..
>
> BIG THANK FOR YOUR HELP....!

That wasn't what I said to do.

Deleting libpython2.6.so itself wouldn't have made any difference and
shouldn't have been necessary.

Since you don't expand on what you recompiled from scratch and how,
have no idea now what the final solution was.

So long as you are happy I guess. There was probably nothing to be
learned from your issues anyway as very much a local packaging
problem.

Graham

MMRUser

unread,
Apr 13, 2010, 1:08:50 PM4/13/10
to modwsgi
Search through the net and finds out that httpd-devel has the APXS
binary and other files, so If I install httpd-devel, can I compile the
mod_wsgi without any errors.
Reply all
Reply to author
Forward
0 new messages