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

de-co-de: mach-o, but wrong architecture
If you install the 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/ into server: \
dlopen(/usr/libexec/apache2/, 10): no suitable image found.\
Did find:\n\t\
/usr/libexec/apache2/ 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
sudo make install

Leave a Reply

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

You are commenting using your 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