When I was troubleshooting a git install, I did a few things.

I think that I modified my default path.

Echo $path 



I hope I typed that correctly.
That seems wrong. Why would git be included in my top level path ?

I looked in

/etc paths

And find this in the file


I ask because when I type commands, I am now many times getting this error

Dyld:DYLD_environmental variables being ignored because main executable 
(/usr/bin/sudo) is setuid or setgid

Is there something that I can look at in when I type

$ env

The above error seems to be setting up a bunch of roadblocks.

  • Having /usr/local/git/bin is probably fine. What is in that directory? I suspect that is where Git keeps all the commands (like git-log) that implement the git subcommands (such as git log), rather than cluttering up /usr/local/bin where presumably git is kept. – chepner Sep 26 '14 at 1:12
  • I think your problem is that you have set $DYLD_LIBRARY_PATH or one of its relatives, and the system is telling you that you can't interfere with sudo like that. – Jonathan Leffler Feb 10 '15 at 14:37

In OS X, the PATH environment variable is build with path_helper. This utility reads the contents of the file /etc/paths and the files in the directory /etc/paths.d to build the PATH environment variable.

Initially the /etc/paths.d directory is empty and the content of /etc/paths is


In consequence, the default PATH value is

  • Please explain how you determined that value? How do we know that's correct? – Jonathan Leffler Feb 10 '15 at 14:33
  • I've modified my answer to add more details. – Ortomala Lokni Feb 10 '15 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.