linux - Matlab MCR 追加环境变量

标签 linux matlab shell unix environment-variables

我不是 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/

相关文章:

linux - 在 vim 插入模式下从左向右移动光标时随机出现在屏幕上的字符

linux - 集群中的 nohup 多个命令

c - 如何捕获输入设备并防止其默认行为

python - Ubuntu Command 'pip' not found,但有18个类似的

matlab - 强制 parfor 遵守某些命令

linux - 在 Shell 脚本目录中的文件夹数组中并显示每个文件夹中的文件,重命名/删除选项

matlab - 两个信号之间的相似性 : looking for simple measure

matlab - 从结构体到数组

java - 在 shell 脚本中运行 Hadoop 命令

Python shell 在读取 (fasta) 文件时卡住