1.找到自己需要的文件夹,下载压缩包,版本自己发挥
wget https://ssd.mathworks.com/supportfiles/downloads/R2021a/Release/6/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2021a_Update_6_glnxa64.zip
2.解压
unzip MATLAB_Runtime_R2021a_Update_6_glnxa64.zip
3.安装
./install -mode silent -agreeToLicense yes
安装完成后,会给一个环境变量路径:/usr/local/MATLAB/MATLAB_Runtime/v910/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v910/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v910/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v910/extern/bin/glnxa64
注:按照自己控制台的输出进行复制,后面需要将该路径加入到配置文件
4.路径加入到环境变量
export LD_LIBRARY_PATH=export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v910/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v910/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v910/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v910/extern/bin/glnxa64