Cannot start apache2 with php5 due to missing sqlite3

Mark Duling mark.duling at biola.edu
Fri Jan 26 21:59:34 PST 2007


Ryan Schmidt <ryandesign at macports.org> on Friday, January 26, 2007 at
12:48 PM -0800 wrote:
>> I installed apache2, php5 and mysql5 through macports and the  
>> installation went great.
>> I added the LoadModule line for php5 and tried to start Apache2.
>>
>> The problem is that apache doesn't want to start. Apache prints  
>> this message to error_log:
>> dyld: /opt/local/apache2/bin/httpd Undefined symbols:
>> _sqlite3_bind_parameter_count
>> _sqlite3_bind_text
>> _sqlite3_changes
>> _sqlite3_close
>> _sqlite3_column_bytes
>> _sqlite3_column_count
>> _sqlite3_column_name
>> _sqlite3_column_text
>> _sqlite3_column_type
>> _sqlite3_errmsg
>> _sqlite3_finalize
>> _sqlite3_free
>> _sqlite3_mprintf
>> _sqlite3_open
>> _sqlite3_prepare
>> _sqlite3_reset
>> _sqlite3_step
>>
>> Apache starts without any problems if I remove the LoadModule line  
>> for the php5 module.
>>
>> My spec:
>> Panther 10.3.9
>> Macport version 1.320
>>
>> Any ideas how this can be solved?
>
>It sounds like you need sqlite3, and you don't have it.
>
>On my 10.4.8 system, sqlite3 exists here:
>
>/usr/lib/libsqlite3.dylib
>
>It's provided by BaseSystem.pkg, so I doubt there could be a 10.4  
>system without that file. But I'm not sure about 10.3.9.
>
>Do you have the file /usr/lib/libsqlite3.dylib? Please let us know.  
>If not, it's possible that Apple didn't ship sqlite3 with Mac OS X  
>until 10.4.0. If that is the case, then for Mac OS X versions earlier  
>than that, we should add a dependency on the sqlite3 port to the php5  
>portfile.

Well check this out.  So I have Apache 2.4.2 installed on a clean OS X
box, but a port I have during configure does a 'apxs -q CC' (I patched it
to find ${prefix}/apache2/bin/apxs) but it looks for a MacPorts mysqlite
library.

 /opt/local/apache2/bin/apxs -q CC
dyld: Library not loaded: /opt/local/lib/libsqlite3.0.dylib
  Referenced from: /opt/local/apache2/bin/httpd
  Reason: image not found
apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary `/opt/local/apache2/bin/httpd'..

So the test fails.  But after I install MacPorts mysqlite3, it is fine.

/opt/local/apache2/bin/apxs -q CC
gcc 

So should mysqlite3 be a dependency of Apache?

Mark




More information about the macports-users mailing list