469,332 Members | 6,678 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,332 developers. It's quick & easy.

mod-python on Mac OSX 10.5

I am trying to install mod_python on OSX 10.5, Intel version.

sudo apachectl configtest tells me this:

httpd: Syntax error on line 114 of /private/etc/apache2/httpd.conf:
Cannot load /usr/libexec/apache2/mod_python.so into server:
dlopen(/usr/libexec/apache2/mod_python.so, 10): no suitable image
found. Did find:\n\t/usr/libexec/apache2/mod_python.so: mach-o, but
wrong architecture

I attempted to follow instructions found on these pages but it didn't work:

<http://mike.crute.org/blog/2007/11/08/mod_python-on-leopard/>

<http://farbflash.de/cgi-bin/blosxom.cgi/Dokumente/MacOSX/Leopard/ApacheModules/python_module.html>

Can

anyone tell me what is causing this error?

-- Gnarlie
http://Gnarlodious.com/
--
Posted via a free Usenet account from http://www.teranews.com

Jan 8 '08 #1
1 1239
On Jan 8, 5:27*am, Gnarlodious <lists.gnarlodi...@gmail.comwrote:
I am trying to install mod_python on OSX 10.5, Intel version.

sudo apachectl configtest tells me this:

httpd: Syntax error on line 114 of /private/etc/apache2/httpd.conf:
Cannot load /usr/libexec/apache2/mod_python.so into server:
dlopen(/usr/libexec/apache2/mod_python.so, 10): no suitable image
found. Did find:\n\t/usr/libexec/apache2/mod_python.so: mach-o, but
wrong architecture

I attempted to follow instructions found on these pages but it didn't work:

<http://mike.crute.org/blog/2007/11/08/mod_python-on-leopard/>

<http://farbflash.de/cgi-bin/blosxom.cgi/Dokumente/MacOSX/Leopard/Apac...>

Can

anyone tell me what is causing this error?
(Sorry no time to read the references you provide)

This is because httpd is running in 64 bits (arch x86_64) but
mod_python.so is only 32 bits by default. You need to modify this.
what I did was:

make the following changes to src/Makefile:
* Add -arch x86_64 to the LDFLAGS line
* Change the build line in mod_python.so to:
$(APXS) $(INCLUDES) -c -Wc,"-arch x86_64" $(SRCS) $(LDFLAGS) $
(LIBS)

Now that I look at this, I don' know if both are necessary... But it
worked for me.

There was a discussion to the mod_python mailing list in october 2007:

http://www.modpython.org/pipermail/m.../2007-October/

--
Arnaud

Jan 8 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Todd | last post: by
7 posts views Thread by Jo | last post: by
4 posts views Thread by Mark | last post: by
4 posts views Thread by Mike Reid | last post: by
4 posts views Thread by Diogo Alves - Software Developer | last post: by
10 posts views Thread by Edward Mogel | last post: by
3 posts views Thread by Michael C# | last post: by
mod
3 posts views Thread by Laura K | last post: by
Mod
1 post views Thread by RN1 | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by haryvincent176 | last post: by
reply views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.