how to clean up the dynamic library cache for binaries

sometimes binaries can’t find their dynamically linked libraries- the Xcode install didn’t go well, MacPorts got confused, OS upgrade, whatever… instead of resorting to all manner of hacks like shell wrappers to set the * DYLD_… * environment variables, one can update the system’s cache with the following:

  • sudo update_dyld_shared_cache -force *