de-co-de: Apache Tomcat connector – mach-o, but wrong architecture

de-co-de: mach-o, but wrong architecture
If you install the mod_jk.so connector yourself on OS X 10.5 intel you may get the following error.

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

This error is because apache is compiled as a 64 bit executable and configure builds a 32 bit shared library

You have to re-do the configure with

./configure CFLAGS=’-arch x86_64′ APXSLDFLAGS=’-arch x86_64′ –with-apxs=/usr/sbin/apxs
make
sudo make install

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s