Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Reinstall Apache

Hi,

I updated a library (libpng) and now Apache is complaining that it can't find it. I used homebrew to install the latest ImageMagick (required by a Ruby Gem to code in Ruby). It seems to have installed a more recent version of libpng and now Apache crashes.

The error is:

05/04/11 06:43:29 org.apache.httpd[90200] 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

Do you have any idea of how to revert back to the original version or, if possible, update Apache?

Thanks in advance,
Juan

MBP, Mac OS X (10.6.7)

Posted on Apr 4, 2011 4:57 PM

Reply
7 replies

Apr 4, 2011 5:49 PM in response to Juan.Bangkok

Don't do anything to Apache.

First, explain exactly what you did. It is safe to install things to a Homebrew-specific path like /opt/local. Just don't try to replace anything in /usr.

Restore your /etc/apache2/httpd.conf file from backup, verify that Apache works, and then, when you have the original system software working normally, explain what software you would like to run, but can't.

Apr 4, 2011 9:09 PM in response to etresoft

It's not that easy I fear. The problem isn't with the httpd.conf file, but with the libpng file (now updated to ibpng14.0.dylib) This is one of several libraries updated by homebrew doing a:

brew install imagemagick

So Apache no longer can find it.

It's really hard to rollback to a previous state via backup because I don't know what directories and what files were affected by the homebrew install. If is there a way to reinstall the current version of Apache with all its dependencies, that could be an approach. Otherwise, it seems that for the first time I may need to reinstall the whole OS like in Windows.

Apr 5, 2011 4:44 AM in response to Juan.Bangkok

Homebrew doesn't update any system libraries. Like similar tools, it installs things into it's own directories. I don't think there is any need to reinstall any system software.

Just humor me and restore a backup of /private/etc/apache2/httpd.conf and see what happens. Then you can explain what you need that the base system doesn't provide.

Apr 6, 2011 10:22 PM in response to etresoft

No, it isn't working.

I've checked php.ini and it has no changes.

In my /opt/local/lib dir I've the libpng14 library files, not the libpng12. Do you know if the standard one is libpng12?

If so, Apache httpd.config file points to the old library, so it's seems that somehow this time installing the ImageMagick library -and it's dependencies- updated that library, leaving Apache pointing to the old one.

I've already tried to get the previous version from the backup and Apache then complains about a different library. I guess the chain of dependencies included several of them.

I really think that a way to update Apache could fix this. I just didn't find any Apache package in homebrew.

Reinstall Apache

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.