Unable to set DYLD_LIBRARY_PATH variable for MatLab compiler runtime

Hi All,


Matlab compiler runtime needs to be set into the DYLD_LIBRARY_PATH variable for other applications built on top of Matlab to work. In El Capitan, setting the variable using the launchctl command does not work and logs an error in system log.


1.Install MCR from http://in.mathworks.com/products/compiler/mcr/

2. Open terminal and run the following commands.

a. launchctl setenv DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH:/Applications/MATLAB/MATLAB_Compiler_Runtime/v83/runtime/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v83/sys/os/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v83/bin/maci64

b. launchctl getenv DYLD_LIBRARY_PATH


The launchctl setenv command generates the following log message in syslog "Caller not allowed to perform action: launchctl.1106, action = set dyld environment variable, code = 150: Operation not permitted while System Integrity Protection is engaged, uid = ***, euid = ***, gid = **, egid = **, asid = *****". The variable DYLD_LIBRARY_PATH is not set to the desired path.


These same commands were working fine on Yosemite.


Regards,

Rashmi

I’m confused. We discussed this issue in a thread in this very same topic area last week. Why did you create a second thread for this?

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Unable to set DYLD_LIBRARY_PATH variable for MatLab compiler runtime
 
 
Q