Fix dyld linker errors when installing new mosek toolbox

Alec Jacobson

October 03, 2016

weblog/

Each time I upgrade my mosek library, matlab panics and can't find it. The old solution was to monkey with the DYLD_LIBRARY_PATH in all sorts of funny places: ~/.profile, /etc/launch.d, ~/Library/LaunchAgents/environment.plist

These all worked at some point, but as far as I can tell, no longer do. They're also the wrong way to install libraries.

Fortunately, mosek has made life easy. Just

cd /usr/local/mosek/8/tools/platform/osx64x86/bin/
python install.py

This will actually fix all of the binaries and mex files using otool and install_name_tool to find dynamic libraries in their installed locations.