Skip navigation

Reinstall Apache

1847 Views 7 Replies Latest reply: Apr 7, 2011 8:22 AM by etresoft RSS
Juan.Bangkok Calculating status...
Currently Being Moderated
Apr 4, 2011 4:57 PM
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)
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    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.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    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.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Apr 5, 2011 2:40 PM (in response to Juan.Bangkok)
    Juan.Bangkok wrote:
    Done: both are exactly the same (it's been a long time since I touched httpd.conf).


    Does it work now?

    Maybe the damage was done by Mac Ports?


    MacPorts is supposed to operate the same way. It may have changed your php.ini file. Restore that to what it was before too.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Apr 7, 2011 8:22 AM (in response to Juan.Bangkok)
    Do not touch Apache. You can uninstall Homebrew or any ports/fink package. That includes removal of /opt or /sw directories. Do that first. Then, if it still doesn't work, you may need to reinstall the OS. There is no way to tell just what has been done to your system.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.