我正在尝试依赖于 MCR 的 matlab 脚本。我有在执行实际程序之前为此 MCR 目录设置环境变量的包装脚本。包装如下。
#!/bin/csh
set thisdir = `pwd`
# --- SET UP ENVIRONMENT VARIABLES ---
echo --- setting up environment variables ---
# presumed location of MATLAB Component Runtime (MCR) v7.14
# if the MCR is in a different location, edit the line below
set mcr_root = /home/foo/MATLAB_Component_Runtime
echo $mcr_root
setenv LD_LIBRARY_PATH $mcr_root/v81/runtime/glnxa64:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH $mcr_root/v81/sys/os/glnxa64:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH $mcr_root/v81/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH $mcr_root/v81/sys/java/jre/glnxa64/jre/lib/amd64/server:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH $mcr_root/v81/sys/java/jre/glnxa64/jre/lib/amd64:$LD_LIBRARY_PATH
setenv XAPPLRESDIR $mcr_root/v81/X11/app-defaults
# (these may be set permanently by copying the above lines into your login script)
现在,当我运行此脚本时,出现./run_script
此错误-
LD_LIBRARY_PATH: Undefined variable.
我用谷歌搜索了很多,发现了一些相关的问题,但没有一个足够有用。
任何帮助表示赞赏。