Set Run-Time Library Path on Linux Systems - MATLAB & Simulink (original) (raw)
Main Content
At run time, tell the operating system where the API shared libraries reside by setting the environment variable LD_LIBRARY_PATH
. Set the value to_`matlabroot`_/bin/glnxa64:_`matlabroot`_/sys/os/glnxa64
.
The command you use depends on your shell. The command replaces the existingLD_LIBRARY_PATH
value. If LD_LIBRARY_PATH
is already defined, prepend the new value to the existing value.
If you have multiple versions of MATLABĀ® installed on your system, the version you use to build your engine applications must be the first listed in your system Path
environment variable. Otherwise, MATLAB displays Can't start MATLAB engine
.
Set the path every time you run MATLAB. Alternatively, place the commands in a MATLAB startup script.
C Shell
Set the library path using the following command format.
setenv LD_LIBRARY_PATH
_`matlabroot`_/bin/glnxa64:_`matlabroot`_/sys/os/glnxa64
You can place these commands in a startup script, such as~/.cshrc
.
Bourne Shell
Set the library path using the following command format.
LD_LIBRARY_PATH
=_`matlabroot`_/bin/glnxa64:_`matlabroot`_/sys/os/glnxa64
:LD_LIBRARY_PATH
export LD_LIBRARY_PATH
You can place these commands in a startup script such as~/.profile
.