ubuntu12.04安装matlab

1.下载matlab2012a

2.创建挂载目录

sudo mkdir /media/matlab

3.将当前目录切换到镜像文件的目录,然后将镜像文件挂载到刚刚创建的目录下

sudo mount -o loop matlab2012a.iso /media/matlab

3.切换到安装目录,开始安装

因为默认安装到/usr/local目录下,所以需要先更改下该目录的权限。

sudo chmod -R 777 /usr/local

现在开始安装

sudo ./install

选择install without using the internet;

选择yes;

选择I have the File installation key for my licence

(file installation key在挂载目录/media/matlab/crack下面的install.txt文件中)

选择custom(自定义);

指定installation folder;

选择用到的工具箱;

点击install。

4.激活

切换到/usr/local/MATLAB/R2012a/bin

在终端输入如下命令

sudo ./activate_matlab.sh

出现激活画面。

选择Activate manually without the internet;

选择enter full path to your licence file, including the file name.

(license file 在 /media/matlab/crack目录下面的lic_standalone.dat)

完成激活。

6.在/usr/local/MATLAB/R2012a/bin目录下输入如下命令:

./matlab -desktop

此时,就会启动matlab了。

但是,有可能终端会有提示“/lib/libc.so.6: not found”的错误,在终端输入如下命令:

sudo ln -s /lib/i386-linux-gnu/libcso.6 /lib/libc.so.6

不同系统命令可能会有所不同。

下面我们把matlab加入到unity的launcher上去。

切换目录到/usr/share/applications,这里存放了所有在launcher上可以找到的程序的desktop文件,我们创建matlab.desktop文件,内容如下:

[Desktop Entry]
 Version=1.0
 Encoding=UTF-8
 Exec=/usr/local/MATLAB/R2012a/bin/matlab
 Icon=/usr/local/MATLAB/R2012a/toolbox/nnet/nnresource/icons/matlab.png
 Name=Matlab
 Type=Application
 Terminal=false
 Caption=Matlab

保存,退出。
最后,为matlab添加桌面快捷方式:

sudo apt-get install --no-install-recommends gnome-panel
gnome-desktop-item-edit --create-new ~/Desktop

在命令栏里填入如下命令

/usr/local/MATLAB/R2012a/bin/matlab -desktop

matlab和-desktop之间有空格,-desktop不能少。
好了,快捷方式有了。

posted @ 2013-05-22 16:06  宁雨  阅读(403)  评论(0编辑  收藏  举报