gpt4 book ai didi

linux - Matlab MCR 追加环境变量

转载 作者:太空宇宙 更新时间:2023-11-04 12:51:41 39 4
gpt4 key购买 nike

我不是 linux 专家,在我犯错误之前,我想了解如何设置我的环境变量。安装 Matlavb MCR 后,我收到此消息:

On the target computer, append the following to your LD_LIBRARY_PATH environment variable:

/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/bin/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/server:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64


Next, set the XAPPLRESDIR environment variable to the following value:

/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/X11/app-defaults

我有一个 Red Hat 服务器,我阅读了导出命令或

add a file in /etc/ld.so.conf.d/ (it should end in .conf), containing the full path of the directory

将此路径永久添加到我的环境变量的最佳做法是什么?谢谢

最佳答案

在您的 .bashrc 文件(或相应的资源文件,如果您使用不同的 shell),放入以下代码:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/bin/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/server:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64

export XAPPLRESDIR=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/X11/app-defaults

注意:如果您使用不同的 shell,语法可能会略有不同。

关于linux - Matlab MCR 追加环境变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36982644/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com