Trying to install, but getting syntax error

Visto 110 veces
Saltar al primer mensaje no leído

nerdydork

no leída,
22 sept 2008, 15:40:2522/9/08
a modwsgi
When I try adding the line to Load the module in httpd.conf

LoadModule wsgi_module /usr/lib/httpd/modules/mod_wsgi.so

I get the following error:
Configuration problem detected on line 221 of file /usr/local/apache/
conf/httpd.conf: : Syntax error on line 1 of /usr/local/apache/conf/
includes/pre_virtualhost_2.conf: API module structure 'wsgi_module' in
file /usr/lib/httpd/modules/mod_wsgi.so is garbled - expected
signature 41503232 but saw 41503230 - perhaps this is not an Apache
module DSO, or was compiled for a different Apache version? --- /usr/
local/apache/conf/httpd.conf --- 215 216 217 218# SUEXEC is supported
219 220Include "/usr/local/apache/conf/includes/
pre_virtualhost_global.conf" 221 ===> Include "/usr/local/apache/conf/
includes/pre_virtualhost_2.conf" <=== 222 223# DO NOT EDIT.
AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE
INCLUDE FILES. 224NameVirtualHost * 225 226# Default vhost for unbound
IPs 227 --- /usr/local/apache/conf/httpd.con

I'm thinking maybe it is trying to compile for Apache 2.0 and I'm
running Apache 2.2? Can someone tell me how I might fix this?

Thanks,
Dustin

Clodoaldo

no leída,
22 sept 2008, 16:17:1522/9/08
a modwsgi
If you have both versions installed then you can use the --with-apxs
option of the configure script:

http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide

Regards, Clodoaldo Pinto Neto

> Thanks,
> Dustin

nerdydork

no leída,
22 sept 2008, 16:43:1022/9/08
a modwsgi
Well, maybe was wrong. when I run ./configure, it looks like it's
pulling the right version of Apache:

root@host [/usr/local/src/mod_wsgi-2.3]# ./configure
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking Apache version... 2.2.9
checking for python... /usr/local/bin/python
configure: creating ./config.status
config.status: creating Makefile

Graham Dumpleton

no leída,
22 sept 2008, 19:53:3222/9/08
a mod...@googlegroups.com
How are you installing the mod_wsgi Apache module? By hand, or by
using 'make install'?

What is the output of running:

ls -las /usr/lib/httpd/modules/mod_wsgi.so

file /usr/lib/httpd/modules/mod_wsgi.so

ldd /usr/lib/httpd/modules/mod_wsgi.so

strings /usr/lib/httpd/modules/mod_wsgi.so | grep AP2

/usr/sbin/httpd -v

Graham

2008/9/23 nerdydork <dustin...@gmail.com>:

nerdydork

no leída,
23 sept 2008, 11:42:1523/9/08
a modwsgi
I'm using make install (I following this tutorial:
http://m.andric.us/post/43754517/django-python-with-cpanel-whm)

> What is the output of running:
>
> ls -las /usr/lib/httpd/modules/mod_wsgi.so
248 -rwxr-xr-x 1 root root 247652 Sep 22 19:00 /usr/lib/httpd/modules/
mod_wsgi.so*

> file /usr/lib/httpd/modules/mod_wsgi.so
/usr/lib/httpd/modules/mod_wsgi.so: ELF 32-bit LSB shared object,
Intel 80386, version 1 (SYSV), not stripped

> ldd /usr/lib/httpd/modules/mod_wsgi.so
libpython2.5.so.1.0 => /opt/python2.5/lib/libpython2.5.so.1.0
(0xb7e99000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7e86000)
libdl.so.2 => /lib/libdl.so.2 (0xb7e82000)
libutil.so.1 => /lib/libutil.so.1 (0xb7e7e000)
libc.so.6 => /lib/tls/libc.so.6 (0xb7d4f000)
libm.so.6 => /lib/tls/libm.so.6 (0xb7d2c000)
/lib/ld-linux.so.2 (0xb7fea000)

> strings /usr/lib/httpd/modules/mod_wsgi.so | grep AP2
[nothing]

> /usr/sbin/httpd -v
Server version: Apache/2.2.9 (Unix)
Server built: Sep 22 2008 18:15:03
Cpanel::Easy::Apache v3.2.0 rev4436

Thanks,
Dustin

On Sep 22, 5:53 pm, "Graham Dumpleton" <graham.dumple...@gmail.com>
wrote:

Graham Dumpleton

no leída,
23 sept 2008, 19:13:3623/9/08
a mod...@googlegroups.com
2008/9/24 nerdydork <dustin...@gmail.com>:

>
> I'm using make install (I following this tutorial:
> http://m.andric.us/post/43754517/django-python-with-cpanel-whm)
>
>> What is the output of running:
>>
>> ls -las /usr/lib/httpd/modules/mod_wsgi.so
> 248 -rwxr-xr-x 1 root root 247652 Sep 22 19:00 /usr/lib/httpd/modules/
> mod_wsgi.so*
>
>> file /usr/lib/httpd/modules/mod_wsgi.so
> /usr/lib/httpd/modules/mod_wsgi.so: ELF 32-bit LSB shared object,
> Intel 80386, version 1 (SYSV), not stripped
>
>> ldd /usr/lib/httpd/modules/mod_wsgi.so
> libpython2.5.so.1.0 => /opt/python2.5/lib/libpython2.5.so.1.0
> (0xb7e99000)
> libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7e86000)
> libdl.so.2 => /lib/libdl.so.2 (0xb7e82000)
> libutil.so.1 => /lib/libutil.so.1 (0xb7e7e000)
> libc.so.6 => /lib/tls/libc.so.6 (0xb7d4f000)
> libm.so.6 => /lib/tls/libm.so.6 (0xb7d2c000)
> /lib/ld-linux.so.2 (0xb7fea000)
>
>> strings /usr/lib/httpd/modules/mod_wsgi.so | grep AP2
> [nothing]

If there is no AP22 string, then possibly you have compiled against
Apache 1.3. Try doing this again but use:

strings -a /usr/lib/httpd/modules/mod_wsgi.so | grep AP2

Do you have Apache 1.3 installed on the system, or perhaps do you have
the wrong apache-dev package installed, such that you actually have
header files for Apache 1.3 installed?

Use your packaging system to work out what the runtime and development
packages related to Apache are that you have installed and post the
names here. If you are using 'apache2', you must have 'apache2-dev'
and not 'apache-dev'.

Post the output from when you ran 'make' to build mod_wsgi. Also from
that, work out where Apache header files are installed, possibly
/usr/include/httpd and look in that directory. If there is an
ap_release.h header file it is indeed Apache 2.2. If not then it is
Apache 1.3.

Graham

nerdydork

no leída,
23 sept 2008, 23:30:2323/9/08
a modwsgi
I ran strings -a /usr/lib/httpd/modules/mod_wsgi.so | grep AP2 and
still no output.

I looked in /usr/include/httpd/ and found ap_release.h. I opened it
and noticed
...

#define AP_SERVER_BASEVENDOR "Apache Software Foundation"
#define AP_SERVER_BASEPRODUCT "Apache"
#define AP_SERVER_MAJORVERSION "2"
#define AP_SERVER_MINORVERSION "0"
#define AP_SERVER_PATCHLEVEL "52"
...
So it looks like this is for Apache 2.0

I'm running on Centos 4. I'm not sure how to get the latest headers
for Apache 2.2.9, which my system is running... I tried yum, but not
much luck. It seems cPanel uses Easy Apache.

Any ideas?

Thanks!
Dustin

On Sep 23, 5:13 pm, "Graham Dumpleton" <graham.dumple...@gmail.com>
wrote:
> 2008/9/24 nerdydork <dustin.da...@gmail.com>:

Graham Dumpleton

no leída,
23 sept 2008, 23:47:2223/9/08
a mod...@googlegroups.com
2008/9/24 nerdydork <dustin...@gmail.com>:

>
> I ran strings -a /usr/lib/httpd/modules/mod_wsgi.so | grep AP2 and
> still no output.
>
> I looked in /usr/include/httpd/ and found ap_release.h. I opened it
> and noticed
> ...
>
> #define AP_SERVER_BASEVENDOR "Apache Software Foundation"
> #define AP_SERVER_BASEPRODUCT "Apache"
> #define AP_SERVER_MAJORVERSION "2"
> #define AP_SERVER_MINORVERSION "0"
> #define AP_SERVER_PATCHLEVEL "52"
> ...
> So it looks like this is for Apache 2.0
>
> I'm running on Centos 4. I'm not sure how to get the latest headers
> for Apache 2.2.9, which my system is running... I tried yum, but not
> much luck. It seems cPanel uses Easy Apache.

Does the file:

/usr/local/apache/bin/apxs

exist?

If it does, when you run 'configure' for Apache say:

./configure --with-apxs=/usr/local/apache/bin/apxs

If it doesn't, how did /usr/local/apache directory come to be installed?

Graham

nerdydork

no leída,
24 sept 2008, 8:04:0124/9/08
a modwsgi
That aspx file did exist. I ran the configure and that seem to fix the
problem.

THANK YOU GRAHAM!

On Sep 23, 9:47 pm, "Graham Dumpleton" <graham.dumple...@gmail.com>
wrote:
> 2008/9/24 nerdydork <dustin.da...@gmail.com>:
>
>
>
>
>
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos