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
In zsh:
sudo () { ( unset LD_LIBRARY_PATH DYLD_LIBRARY_PATH; exec command sudo $* ) }
This spawns a sub-shell in which the environment variables sudo complains about are unset, and then executes sudo (via exec so that the now-unecessary parent shell exits immediately).
I'll leave it as an exercise to the reader to port to bash, et al.