What is the correct value for LD_LIBRARY_PATH on 64-bit Linux when using MATLAB Compiler 4.4 (R2006a)?

8 次查看(过去 30 天)
The MATLAB Compiler documentation lists the following to set my LD_LIBRARY _PATH variable.
setenv LD_LIBRARY_PATH
$MATLABROOT/sys/os/glnxa64:
$MATLABROOT/bin/glnxa64:
$MATLABROOT/sys/java/jre/glnxa64/jre1.4.2/lib/amd64/native_threads:
$MATLABROOT/sys/java/jre/glnxa64/jre1.4.2/lib/amd64/client:
$MATLABROOT/sys/java/jre/glnxa64/jre1.4.2/lib/amd64:
$MATLABROOT is the MATLAB root directory on your machine, as returned by typing:
matlabroot
at the MATLAB command prompt.
However, there is no folder named:
$MATLABROOT/sys/java/jre/glnxa64/jre1.4.2/lib/amd64/client:
When I executed my application with the LD_LIBRARY_PATH variable set to the above value, I receive the following error message.
Warning: Unable to load Java Runtime Environment: libjvm.so: cannot open shared object file: No such file or directory.
Warning: Disabling Java support
Hello, World
Severe:
javainit.cpp:216: Assert : JNI_OK == jvmLoadResult, ""
The program '[12467] : Native' has exited with code 2 (0x2).
Abort

采纳的回答

MathWorks Support Team
There is an error in the documentation for MATLAB Compiler 4.4 (R2006a) with regards to the value of the LD_LIBRARY_PATH environment variable on 64-bit Linux platforms.
On a development machine, the documentation should read:
setenv LD_LIBRARY_PATH
$MATLABROOT/sys/os/glnxa64:
$MATLABROOT/bin/glnxa64:
$MATLABROOT/extern/lib/glnxa64:
$MATLABROOT/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/native_threads:
$MATLABROOT/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/server:
$MATLABROOT/sys/java/jre/glnxa64/jre1.5.0/lib/amd64
setenv XAPPLRESDIR $MATLABROOT/X11/app-defaults
For a deployment machine, the documentation should read:
setenv LD_LIBRARY_PATH
$MCR_ROOT/$VER/runtime/glnxa64:
$MCR_ROOT/$VER/sys/os/glnxa64:
$MCR_ROOT/$VER/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/native_threads:
$MCR_ROOT/$VER/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/server:
$MCR_ROOT/$VER/sys/java/jre/glnxa64/jre1.5.0/lib/amd64:
setenv XAPPLRESDIR $MCR_ROOT/$VER/X11/app-defaults
In the preceding example, $MATLABROOT and $MCR_ROOT represent the root directories of the MATLAB ($MATLABROOT) and MATLAB Compiler Runtime (MCR) installation ($MCR_ROOT) respectively. $VER refers to the version of MCR installed (for example, v73 or v74).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2006a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by