背景:
java程序中需要MATLAB Runtime环境,只需要环境不需要软件
安装
1 下载,按需求下载了R2018(9.4)版本64位
2 普通用户下安装
su - tomcat
#解压在 /data/tomcat/temp目录下
unzip MCR_R2018a_glnxa64_installer.zip -d /data/tomcat/temp
cd /data/tomcat/temp
#安装在 /data/tomcat/MCR目录下
./install -mode silent -agreeToLicense yes -destinationFolder /data/tomcat/MCR
当出现下面的字样的时候,就表示MCR安装成功了:
Exitingwith status 0
End – Successful.
Finished
安装完成后会给一个环境变量并添加到 .bash_profile中
vim .bash_profile添加一条
export LD_LIBRARY_PATH=/data/tomcat/MCR/v94/runtime/glnxa64:/data/tomcat/MCR/v94/bin/glnxa64:/data/tomcat/MCR/v94/sys/os/glnxa64:/data/tomcat/MCR/v94/extern/bin/glnxa64
source .bash_profile
重启tomcat并查看日志是否生效即可
3 如果报错如下
图片.png
需要安装X11
yum groupinstall "X Window System"
另附内网安装软件
将系统对应的iso包上传
mkdir -p /mnt/iso/
mount -o loop xxx.iso /mnt/iso/
cd /etc/yum.repos.d/
[root@confluence-jira yum.repos.d]# cat CentOS-Base.repo
[base]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=file:///mnt/iso
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=file:///mnt/iso
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=file:///mnt/iso
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
安装
yum clean all
yum repolist
yum groupinstall "X Window System"
在尝试即可
参考:
环境下载:https://ww2.mathworks.cn/products/compiler/matlab-runtime.html
安装帮助:https://ww2.mathworks.cn/help/compiler/install-the-matlab-runtime.html
https://www.cnblogs.com/xlij1205/p/11384331.html
网友评论