本文主要是介绍ubuntu14.04 卸载和安装 Matlab2016b,逐步图示,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、卸载:
由于第一次安装失败,故卸载重装,步骤如下:
1.删除挂载
$ sudo umount /media/matlab #挂载几次,删除几次
2.删除 MATLAB(你安装的位置)
$ sudo rm -r /media/matlab #由于我没挂载了,这是之前挂载残留的文件,也给删了
$ sudo rm -r /home/vivian/matlab #你的位置
3.返回主目录,删除隐藏文件(ctrl+h 可以显示查看)
:~$ cd ~
:~$ sudo rm -r .matlab
二、安装
1.下载:链接: https://pan.baidu.com/s/15R8A7oD1OhgHpP7xH0HzcA 提取码: ttwe
下载后的Linux文件夹会有三个文件分别是R2016b_glnxa64_dvd1.iso、R2016b_glnxa64_dvd2.iso和Matlab 2016b Linux64 Crack.rar(破解文件)文件夹。
解压整理后放在home下
2.挂载 只要挂第一个
1) 移动:
sudo mv /home/vivian/matlab /media/
到MATLAB所在的文件夹(才能找到)
#挂载R2016b_glnxa64_dvd1.iso镜像文件,注意放入你的dvd1镜像文件所在路径
sudo mkdir /media/matlab
sudo mount -t auto -o loop ~/matlab/R2016b_glnxa64_dvd1.iso /media/matlab/
mount: block device /media/vivian/资料/linux/R2016b_glnxa64_dvd1.iso is write-protected, mounting read-only
挂载成功,打开文件夹内容如下:
3.安装:
~$ cd /media/matlab
$ ls
activate.ini etc installer_input.txt patents.txt trademarks.txt
archives help java readme.txt ui
bin install license_agreement.txt sys version.txt
$ cd ~
~$ sudo /media/matlab/install
Preparing installation files ...
Installing ...
图示
1)
2)
3)打开Matlab 2016b Linux64 Crack.rar解压后的readme.txt, 复制里面的密钥09806-07443-53955-64350-21751-41297, 到密钥框.
4).选择路径,默认/usr/local/MATLAB/R2016b,我改了安装路径,不知道哪里出问题,打不开。 所以不建议改
5) 默认安装,大概11,751 MB
6)安装进行到80%左右,弹出提示框,"弹出dvd1,并插入dvd2以继续",
7) 重新打开一个终端(ctrl+alt+t),把dvd2挂载到/media/matlab文件夹中:
sudo mount -t auto -o loop ~/matlab/R2016b_glnxa64_dvd2.iso /media/matlab/
8)成功
三、激活:
1.进入安装路径下,新建/licenses/路径,把Matlab+2016b+Linux64+Crack中的license_standalone.lic到/licenses内
#给MATLAB安装目录的文件夹添加权限,防止复制不进去
cd /usr/local/MATLAB/
sudo chmod 777 R2016b#给license_standalone.lic添加权限
sudo chmod 777 sudo chmod 777 license_standalone.lic#进入安装目录的bin文件, 运行matlab文件, 下一步
cd /usr/local/MATLAB/R2016b/bin#运行matlab,弹出激活对话框,选择用不联网的方法进行激活,加载license_standalone.lic文件
sudo ./matlab
1)
2)
3) 新增的文件
2.移动,否则直接运行出错
/home/HelloWorld/bin$ ./matlab
License checkout failed.
License Manager Error -8
Make sure the HostID of the license file matches this machine, and that the HostID on the SERVER
line matches the HostID of the license file.Troubleshoot this issue by visiting:
http://www.mathworks.com/support/lme/R2016b/8Diagnostic Information:
Feature: MATLAB
License path: /home/vivian/.matlab/R2016b_licenses:/home/HelloWorld/licenses/license.dat:/home/HelloWorld/licenses
/license_standalone.lic:/home/HelloWorld/licenses/license_vivian-Super-Server_123456_R2016b.lic
Licensing error: -8,523.
移动:把解压文件linux/Matlab+2016b+Linux64+Crack/R2016b/bin/中的lib*移动
#权限
sudo chmod 777 sudo chmod 777 glnxa64
sudo chmod 777 /home/vivian/matlab/R2016b/bin/glnxa64
#移动
cd /home/vivian/matlab/R2016b/bin/glnxa64
sudo cp lib* /usr/local/MATLAB/R2016b/bin/glnxa64 #移动到安装目录的glnxa64下
cd /usr/local/MATLAB/R2016b/bin
./matlab #可以打开了,如果打不开,重启下终端#或者逐个
sudo cp /home/vivian/matlab/R2016b/bin/glnxa64/libcufft.so.7.5.18 /usr/local/MATLAB/R2016b/bin/glnxa64
sudo cp /home/vivian/matlab/R2016b/bin/glnxa64/libinstutil.so /usr/local/MATLAB/R2016b/bin/glnxa64
sudo cp /home/vivian/matlab/R2016b/bin/glnxa64/libmwlmgrimpl.so /usr/local/MATLAB/R2016b/bin/glnxa64
sudo cp /home/vivian/matlab/R2016b/bin/glnxa64/libmwservices.so /usr/local/MATLAB/R2016b/bin/glnxa64
问题
com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x535b6672, isOwner false, <15a2f11f, 7c843551>[count 0, qsz 0, owner <NULL>]]]
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326)
at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297)
at java.lang.Thread.run(Unknown Source)
Caused by: com.jogamp.opengl.GLException: glXGetConfig(0x1) failed: error code Unknown error code 6
at jogamp.opengl.x11.glx.X11GLXGraphicsConfiguration.glXGetConfig(X11GLXGraphicsConfiguration.java:570)
at jogamp.opengl.x11.glx.X11GLXGraphicsConfiguration.XVisualInfo2GLCapabilities(X11GLXGraphicsConfiguration.java:500)
at jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationXVisual(X11GLXGraphicsConfigurationFactory.java:434)
at jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(X11GLXGraphicsConfigurationFactory.java:240)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createMutableSurfaceImpl(X11GLXDrawableFactory.java:524)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createDummySurfaceImpl(X11GLXDrawableFactory.java:535)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:283)... 2 more
上面错误主要是由于英伟达的独显驱动引起的:
在maltab的命令行中输入opengl('save','software'),回车,重启maltab, 即可。
这个博主让我不能终端启动了https://blog.csdn.net/E_Walle/article/details/71077812
四、后续
1.通过终端直接输入matlab就可直接打开(也就是环境变量)
sudo gedit /etc/profile
#在文件尾部添加:
export PATH="/usr/local/MATLAB/R2016b/bin:$PATH"
#保存并退出并且使得设置生效
source /etc/profile
2.桌面快捷方式(用gedit也一样,方便点)
sudo vim /usr/share/applications/Matlab2016b.desktop
[Desktop Entry]Type=ApplicationName=Matlab2016bGenericName=Matlab 2010bComment=Matlab:The Language of Technical ComputingExec=sh /usr/local/MATLAB/R2016b/bin/matlab -desktop
Icon=/usr/local/MATLAB/R2016b/toolbox/shared/dastudio/resources/MatlabIcon.pngStartupNotify=trueTerminal=falseCategories=Development;Matlab2016b;
按ESC
键 跳到命令模式,然后输入:q
(不保存)或者:wq
(保存) 退出。
3.删除挂载,挂载了两次,执行两次
sudo umount /media/matlab
五、安装失败记录
1.
vivian@vivian-Super-Server:~/matlab/bin$ ./matlab
Fatal Error on startup: 无法定位或初始化类 com/mathworks/jmi/OpaqueJavaInterface。
java.lang.NoClassDefFoundError: com/mathworks/jmi/OpaqueJavaInterface
Caused by: java.lang.ClassNotFoundException: com.mathworks.jmi.OpaqueJavaInterfaceat 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)
2.第二次 我改了安装路径,不知道哪里出问题,打不开。
参考:https://blog.csdn.net/qikaihuting/article/details/70229710
https://blog.csdn.net/minione_2016/article/details/53313271#commentBox
https://www.cnblogs.com/taoyuyeit/p/8823311.html
https://blog.csdn.net/s793223706/article/details/79947844#commentBox
这篇关于ubuntu14.04 卸载和安装 Matlab2016b,逐步图示的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!