服务器安装MATLAB

LINUX无root权限安装MATLAB

1.安装XORRISO

无root权限使用mount命令提取iso文件,使用xorriso。

下载xorriso: https://www.gnu.org/software/xorriso/

安装命令:

tar -zxvf xorriso-1.4.6.tar.gz cd xorriso-1.4.6 ./configure make cd xorriso pwd

将显示的路径加入到PATH环境变量中。

export XORRISO=$APP/xorriso-1.5.0/xorriso

export PATH=$XORRISO:$PATH

提出ISO文件:

xorriso -osirrox on -indev image.iso -extract / MATLAB_SRC

参考:https://superuser.com/questions/180744/how-do-i-extract-an-iso-on-linux-without-root-access

 

2.安装matlab

cd MATLAB_SRC

修改activate.ini

上图来源:https://blog.csdn.net/Xiao_Song_PKU/article/details/82700228

 

./install -mode silent -fileInstallationKey 09806-07443-53955-64350-21751-41297 -agreeToLicense yes -activationPropertiesFile /Data/wind/person/gaoyy/MATLAB_SRC/activate.ini -destinationFolder /Data/wind/person/gaoyy/MATLAB

注释:

-mode silent 是无交互界面静默安装

-agreeToLicense yes ?

-fileInstallationKey 激活码

-activationPropertiesFile 激活文件activate.ini

-destinationFolder 安装路径(必须是绝对路径)

 

3.激活和破解

激活

(可能是为了防止第一次启动需要激活吧,原因不清楚,保险起见再使用activate_matlab.sh激活一次)

进入目录:/Data/wind/person/gaoyy/MATLAB/bin

./activate_matlab.sh -propertiesFile /Data/wind/person/gaoyy/MATLAB_SRC/activate.ini

显示静默激活成功(Slient activation succeeded),完成激活

破解

cd /Data/wind/person/gaoyy/MATLAB/bin/glnxa64

rm -rf libcufft.so.7.0.28 libinstutil.so libmwservices.so

得先强制删除上述文件

再把安装包中crack中相应目录的 libcufft.so.7.0.28 libinstutil.so libmwservices.so复制到/Data/wind/person/gaoyy/MATLAB/bin/glnxa64目录中

激活和破解两段参考:https://blog.csdn.net/Xiao_Song_PKU/article/details/82700228

证书

在安装的顶层目录/Data/wind/person/gaoyy/MATLAB建立licenses文件夹,再将crack中的license_server.lic和license_standalone.lic复制到licenses中。

不进行此步骤会出现如下错误:

Error: Activation cannot proceed. You may either:

1. Set an X11 display, and restart the activation process

2. Use the silent activation feature

3. Activate using the license center

此段参考:http://blog.sina.com.cn/s/blog_6f8171770102x2hx.html

 

4.验证

在bin目录下

./matlab

5.添加环境变量

export MATLAB=/Data/wind/person/gaoyy/MATLAB

export PATH=$MATLAB/bin:$PATH

最后source一下

添加环境变量以后,可在任意窗口输入matlab开启

 

错误

MATLAB is selecting SOFTWARE OPENGL rendering.

Fatal Error on startup: Cannot locate or initialize class com/mathworks/jmi/OpaqueJavaInterface.

java.lang.NoClassDefFoundError: com/mathworks/jmi/OpaqueJavaInterface

Caused by: java.lang.ClassNotFoundException: com.mathworks.jmi.OpaqueJavaInterface

at java.net.URLClassLoader$1.run(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

 

You might want to run 'apt-get -f install' to correct these:

The following packages have unmet dependencies:

docker.io : Depends: containerd (>= 0.2.5~)

Depends: runc (>= 1.0.0~rc2-0ubuntu1~)

Recommends: apparmor but it is not going to be installed

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

安装OPENGL:https://www.linuxidc.com/Linux/2017-03/141555.htm

 

4、sudo apt-get install matlab-support

    配置环境、连启动器都配好了。

  •  

matlab -nodesktop -nosplash -nojvm -r 'meshdemo(5);quit;'

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值