Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In OSX, by default, (apple) libs and components live in /usr.

Since I use MacPorts and compile my own modules, I have the following path setup:

/usr -> default Apple
/usr/local -> My own compiled
/opt/local -> MacPorts

In my .bash_profile I have the following PATH variable set:


However, the PATH variable is not available for all Users and services.

Q. Is this setup recommended? What problems might arise with this?


Q. I'm Running the Default Apache 2 installation with a compiled version of PHP 5.4.8. Where is the best place to set the PATH variable? Keep it in bash_profile? Or do I need to use ~/.launchd.conf or /etc/.launchd.conf so that Apache sees the new PATH var?


Up until recently, every time I needed to install or update a new library, I would compile and replace the ones provided by apple. Unfortunately, that's a path that ultimately leads to insanity, as I found out after a system update crashed my computer completely, forcing me to factory format.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.