Tomcat and Matlab MCR invalid MEX-file error

不问归期 提交于 2019-11-30 19:58:26

问题


I have Tomcat 7 and MCR 8.3 installed on my Ubuntu 14.04 server. Matlab is correctly installed, because I can execute some program, but when I try to execute others i have this error:

Invalid MEX-file '/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/mcr/toolbox/matlab/sparfun/etree.mexa64': libmwarpack.so: cannot open shared object file: No such file or directory

I set the environment in my /etc/profile.d folder in this way:

MCR_ROOT=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83
export PATH=$PATH:$MCR_ROOT/bin:$MCR_ROOT/bin/glnxa64
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MCR_ROOT/runtime/glnxa64:$MCR_ROOT/bin/glnxa64:$MCR_ROOT/toolbox/javabuilder:$MCR_ROOT/sys/os/glnxa64:$MCR_ROOT/sys/java/jre/glnxa64/jre/lib/amd64/server:$MCR_ROOT/sys/java/jre/glnxa64/jre/lib/amd64:$MCR_ROOT/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:$MCR_ROOT/mcr/toolbox/matlab/sparfun:$MCR_ROOT:mcr/toolbox
export LD_LIBRARY_PATH
export MCR_CACHE_ROOT=/home/bull/MCR/cache
export XAPPLRESDIR=$MCR_ROOT/X11/app-defaults

I was a bit frustrated and I added some folder more... The etree.mexa64 and libmwarpack.so files are correctly located.


回答1:


For MATLAB, try setting the LD_RUN_PATH as you would for LD_LIBRARY_PATH. I think this is a small idiosyncrasy of MATLAB.



来源:https://stackoverflow.com/questions/28560592/tomcat-and-matlab-mcr-invalid-mex-file-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!