I was trying to install the ImageMagick library on Mac OS X Snow Leopard, and first I tried port and, after it failed, homebrew. It updated some dependencies and installed ImageMagick without problems.
So far so good. The problem came when I ran Apache. I got the following error in the system log:
07/04/11 12:55:15 org.apache.httpd[41841] httpd: Syntax error on line 115 of /private/etc/apache2/httpd.conf: Cannot load /opt/local/apache2/modules/libphp5.so into server: dlopen(/opt/local/apache2/modules/libphp5.so, 10): Library not loaded: /opt/local/lib/libpng12.0.dylib\n Referenced from: /opt/local/apache2/modules/libphp5.so\n Reason: image not found
I checked the /opt/local/lib and surprise! I don't have the libpng12.0 but the libpng14.0.
So, as far as I can tell, something went wrong installing the ImageMagick library.
Now, I can't find a way to rollback to the previous libraries, other than copying them from the backup. Do you know if is there a way to recover the previous state or reinstall Apache? Or is this just a corrupt state and I must reinstall OS X?
/opt/local/are from MacPorts, but Homebrew (usually) uses/usr/local/. Nothing in the error message refers to either ImageMagick or any Homebrew files (just PHP and libpng from MacPorts; ImageMagick needs libpng, but it also needs lots of other things). How does PHP fit into your goal? You might try rebuilding your MacPorts PHP5 to get it to use the current libpng (probablysudo port update php5), but it seems like you were wanting to move away from MacPorts. Maybe you should build PHP in Homebrew and reconfigure Apache to use it instead. – Chris Johnsen Apr 7 '11 at 6:41upgrade, notupdate, of course. – Chris Johnsen Apr 7 '11 at 8:43