Sort of answering my own question here but hope it will be useful to other people and save them some time.
After receiving my shiny new imac with os x lion pre-installed, I was a little dismayed and confused when I went to System Preferences -> Internet and Wireless -> Sharing and attempted to check the Web Sharing. Every time I clicked this option I was told Web Sharing was starting but would then repeatedly fail and apache failed to start.
Looking in the Console I find:
org.apache.httpd: dyld: Library not loaded: /usr/lib/libpq.5.dylib
org.apache.httpd: Referenced from: /usr/sbin/httpd
org.apache.httpd: Reason: image not found
Entering in the console:
vim /Library/Logs/DiagnosticReports/httpd_2011-08-06-165030_localhost.crash (date and time bit will vary)
Process: httpd 
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd 
Date/Time: 2011-08-06 16:50:30.106 +0100
OS Version: Mac OS X 10.7 (11A511a)
Report Version: 9
Crashed Thread: 0
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Library not loaded: /usr/lib/libpq.5.dylib
Referenced from: /usr/sbin/httpd
Reason: image not found
0x1022f6000 - 0x102352fef httpd (??? - ???) <9D63FBFD-DD87-3DD5-AD1A-D8A79FEC3EE8> /usr/sbin/httpd
"/Library/Logs/DiagnosticReports/httpd_2011-08-06-165030_localhost.crash" 32L, 1469C
TO FIX THIS ISSUE:
It appears /usr/lib/libpq.5.dylib does not exist but /usr/lib/libpq.5.3.dylib does.
Fix by creating a symbolic link from /usr/lib/libpq.5.3.dylib to /usr/lib/libpq.5.dylib
sudo ln -s /usr/lib/libpq.5.3.dylib /usr/lib/libpq.5.dylib
Going back to System Preferences -> Internet and Wireless -> Sharing clicking Web Sharing a couple of times turns Web Sharing on successfully!
Going to http://localhost/ displays the "It Works!" page.
HTH people as it took me a while to find the correct solution online from:
God almighty! It works!!!!!
I had the same darn error and couldn't find anything on it, until I saw your post!
Please go back to this entry and mark it as answered, so people can see that your solution works!!!!