since an update to 10.8 I get the following error, when trying to do a sudo command, which is pretty annoying.
dyld: DYLD_ environment variables being ignored be
Those who use django (python for web), with mysql through MySQLdb (Mysql-Python module), need that variable set. So I just keep the warning for now.
It seems the already mentioned "fixes" are just workarounds that may not work for all users. This is a known bug that Apple is (at least) aware of: http://openradar.appspot.com/11894054
This seems to be a bug introduced in 10.8, see this report. As far as I can tell, the only workaround is not setting DYLD_LIBRARY_PATH or LD_LIBRARY_PATH by default, but only when needed.
This issue is finally fixed on OS X Mavericks (10.9), the message no longer comes up on sudo.
Not sure where the official solve is for this, but I solved it with this bashrc hack, because I couldn't deal with seeing that damn warning any longer.
# set DYLD_* for my normal programs
DYLD_LIBRARY_PATH='..'
# set an alternative sudo
thesudo()
{
# back up the DYLD_* variables
local BACK=$DYLD_LIBRARY_PATH
# unset DYLD_*
unset DYLD_LIBRARY_PATH
# calling sudo
/usr/bin/sudo "$@"
# restore DYLD_* after sudo finished
export DYLD_LIBRARY_PATH=$BACK
}
# redirect sudo
alias sudo=thesudo
Not sure if this is a true fix, but this error disappeared when I ran Clean Build Folder