R14版matlab安装全程及各种问题解决(持续进行中)

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
头像
ztyt110
帖子: 43
注册时间: 2006-11-17 10:13
来自: NUAA (nanjing) china
联系:

R14版matlab安装全程及各种问题解决(持续进行中)

#1

帖子 ztyt110 » 2006-12-29 18:29

有过几次在ubuntu6.10上安装matlab的经验,把过程整理出来,并参考了同窗的贴子,供新手参考:
0.给大家一个deb包的R14版本的matlab,地址如下,驴里面好像没有,已经破解的(不知道非教育网的用户能不能下,try):
ftp://202.38.73.198/linux/matlab7_unix/ ... 2_i386.deb
运气好的话,安装就简单了:
sudo dpkg -i ~/matlab7_7-2_i386.deb
起动器路径是:
/usr/lib/matlab7/bin/matlab -desktop
:)
其他设置参照下面的步骤7.9.10。

1.下载matlab软件(R14版的,清华大学ftp下载
ftp://59.66.122.55/pub/software/Science ... atlab/下,匿名

2.创建光盘映象挂载目录和安装目录
$sudo mkdir /mnt/cdrom1 /mnt/cdrom2 /mnt/cdrom3
$sudo mkdir /opt/matlab

3. license.dat的处理:
直接执行下面语句
$sudo cp ~/license.dat /opt/matlab
(我的版本是单独下载的license.dat,请注意,“~”号代表你的license.dat的存放路径,有的是在光盘1的crack中)


4.挂载映象

$sudo mount -o loop ~/Matlab1.iso /mnt/cdrom1
$sudo mount -o loop ~/Matlab2.iso /mnt/cdrom2
$sudo mount -o loop ~/Matlab2.iso /mnt/cdrom3
说明
1.请把“~”换成你的映象存放路径
2.”Matlab1.iso“等也请改成您的映象名,比如我的是 MathWorks_R14_1.iso 等

5.安装
$sudo /mnt/cdrom1/install
不支持从光盘目录直接运行,不要试图cd进光盘,然后输入sudo ./install安装

本过程中,你只需要点ok,yes (换盘的时候当然是点ok就行)。另外,出现让你输入安装路径的时候请输入:
/opt/matlab(想装在别处自行考虑地址)

6.license.lic的处理
把license.lic从光盘中复制出来并打开,并把第一行的"your_host_name"改成你自己的,比如我的是"ztyt110-desktop",保存。
然后把保存好的文件license.lic复制到 “/opt/matlab/etc”
请参考
sudo mv /media/sda6/linux资源/matlab-linux/license.lic /opt/matlab/etc
(此处发现用cp是不行的,遂用mv)

7.安装基本配置
$sudo /opt/matlab/install_matlab
一路OK就行了.

8.卸载盘符:
$sudo umount /mnt/cdrom1
$sudo umount /mnt/cdrom2
$sudo umount /mnt/cdrom3
$sudo rm -r /mnt/cdrom*

9.改用系统自用的java,以支持中文路径。(这样虽然很好的解决了,中文的问题,但是发现GUI启动不了。)
$sudo gedit /opt/matlab/bin/matlab
添加一句 “export MATLAB_JAVA=/usr/lib/jvm/java-1.5.0-sun/jre”(路径请自己确认)

10.解决simulink不能起动的问题
$sudo apt-get install libxft1

11.maple工具包不能使用的问题
yourchum 写了:谢谢10楼。。。
这个问题

可能报错,如下:
Unable to load mex file: /usr/local/matlab/toolbox/symbolic/maplemex.mexglx.
/usr/local/matlab/bin/glnx86/libmaple.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
??? Invalid MEX-file '/usr/local/matlab/toolbox/symbolic/maplemex.mexglx': .

解决方法正如10所说,如同LZ的第9步中的方法,
加入export LD_ASSUME_KERNEL=2.4.1,设置这个环境变量
12.解决mex不能调用gcc的问题(与c混合编程)
删掉 matlab自己的libgcc_s.so.1,
用系统自己的/lib/libgcc_s.so.1复制即可.(可参考http://forum.ubuntu.org.cn/viewtopic.php?t=33659&start=0&postdays=0&postorder=asc&highlight=libgcc的帖子,类似的问题都可以这样解决!)


13.起动器的设置请参考
viewtopic.php?t=31992&start=0&postdays= ... =matlab”此文
就是初学者园地的 “ 安装matlab在/opt/matlab/里,在桌面上生成了一个启动器,可是程序不运行"一文
我的见图,语句中/opt/matlab/bin/matlab -desktop注意-前面有一空格。







以下是我在机子上安装R14的所有语句(我的license.dat,license.lic,三个安装光盘都在/media/sda6/linux资源/matlab-linux/下)
1.下载文件
2.sudo mkdir /mnt/cdrom1 /mnt/cdrom2 /mnt/cdrom3
sudo mkdir /opt/matlab

3.sudo cp /media/sda6/linux资源/matlab-linux/license.dat /opt/matlab

4.sudo mount -o loop /media/sda6/linux资源/matlab-linux/MathWorks_R14_1.iso /mnt/cdrom1

sudo mount -o loop /media/sda6/linux资源/matlab-linux/MathWorks_R14_2.iso /mnt/cdrom2

sudo mount -o loop /media/sda6/linux资源/matlab-linux/MathWorks_R14_3.iso /mnt/cdrom3

5.sudo /mnt/cdrom1/install

6.sudo mv /media/sda6/linux资源/matlab-linux/license.lic /opt/matlab/etc

7.sudo /opt/matlab/install_matlab

8.sudo gedit /opt/matlab/bin/matlab
添加一句 “export MATLAB_JAVA=/usr/lib/jvm/java-1.5.0-sun/jre”(路径请自己确认)
9.sudo apt-get install libxft1

10.
$sudo umount /mnt/cdrom1
$sudo umount /mnt/cdrom2
$sudo umount /mnt/cdrom3
$sudo rm -r /mnt/cdrom*

11.我用的matlab的图标,不喜欢自带的那个。
附件
matlab启动器设置.jpg
post-23-1090944178_czSVZ4PexkVl.png
上次由 ztyt110 在 2007-01-11 21:20,总共编辑 10 次。
shazihoo
帖子: 148
注册时间: 2006-08-26 23:09
来自: 四川

#2

帖子 shazihoo » 2006-12-29 18:50

强烈建议使用scilab。
如果有机会,参加scilab编程比赛,还可以去巴黎一周。
Impossible canceled "IM" is possible.
Have faith in yourself. Someday you would shout "I did it!".
http://suneng.blogspot.com
头像
ztyt110
帖子: 43
注册时间: 2006-11-17 10:13
来自: NUAA (nanjing) china
联系:

#3

帖子 ztyt110 » 2006-12-29 18:56

shazihoo 写了:强烈建议使用scilab。
如果有机会,参加scilab编程比赛,还可以去巴黎一周。
我得听老板的呀,等俺毕业了再考虑吧,谢谢你!
shazihoo
帖子: 148
注册时间: 2006-08-26 23:09
来自: 四川

#4

帖子 shazihoo » 2006-12-29 20:36

boss,有几个知道linux为何物的?
Impossible canceled "IM" is possible.
Have faith in yourself. Someday you would shout "I did it!".
http://suneng.blogspot.com
hhyyjj163
帖子: 171
注册时间: 2006-11-25 11:54
来自: 武汉.汉口
联系:

#5

帖子 hhyyjj163 » 2007-01-01 13:59

matlab为何物?
头像
yourchum
帖子: 12
注册时间: 2006-12-08 0:12

#6

帖子 yourchum » 2007-01-05 17:10

好贴,thx
:D
头像
yourchum
帖子: 12
注册时间: 2006-12-08 0:12

#7

帖子 yourchum » 2007-01-08 10:55

怎么总是找补到libxft1
请问ztyt110,能贴一下你的soures.list吗?
谢谢
头像
ztyt110
帖子: 43
注册时间: 2006-11-17 10:13
来自: NUAA (nanjing) china
联系:

#8

帖子 ztyt110 » 2007-01-10 19:05

yourchum 写了:怎么总是找补到libxft1
请问ztyt110,能贴一下你的soures.list吗?
谢谢

给你的建议,我的是ubuntu6.10版
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list
后,请把下面的源加进去:

##如果是教育网用户推荐使用上海交通大学的源:

deb http://ftp.sjtu.edu.cn/ubuntu/ edgy main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ edgy-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ edgy-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ edgy-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ edgy-updates main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ edgy bleeding main multiverse restricted universe

deb http://archive.ubuntu.com/ubuntu/ edgy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ edgy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ edgy main restricted universe multiverse

##这里你也可以直接使用更快速的ubuntu.cn99.com的源(推荐):

deb http://ubuntu.cn99.com/ubuntu/ edgy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ edgy main restricted universe multiverse

##这里你还可以使用速度也非常快的的mirror.lupaworld.com的源:

deb http://mirror.lupaworld.com/ubuntu/archive/ edgy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ edgy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ edgy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ edgy-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn/ edgy main restricted universe multiverse



##教育网用户也推荐使用清华大学计算机系学生科协的源:

deb http://mirror.net9.org/ubuntu/ edgy main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ edgy-backports main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ edgy-proposed main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ edgy-security main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ edgy-updates main multiverse restricted universe
deb http://mirror.net9.org/ubuntu-cn/ edgy main multiverse restricted universe

##另外,中国台湾的源
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-security main restricted universe multiverse
上次由 ztyt110 在 2007-01-11 21:17,总共编辑 1 次。
头像
yourchum
帖子: 12
注册时间: 2006-12-08 0:12

#9

帖子 yourchum » 2007-01-10 23:19

非常感谢,解决了!
终于见到了simulink的界面
xiechy
帖子: 1074
注册时间: 2006-01-18 15:01

#10

帖子 xiechy » 2007-01-11 10:08

这是ustc的happyWu前辈很久以前打的包,教育网当然能用。建议用新版。
另外,对其中的maple功能要自己export LD_ASSUME_KERNEL=2.4.1
理由是Native POSIX Libarary引入前后的兼容问题。
头像
yourchum
帖子: 12
注册时间: 2006-12-08 0:12

#11

帖子 yourchum » 2007-01-11 16:38

谢谢10楼。。。
这个问题

可能报错,如下:
Unable to load mex file: /usr/local/matlab/toolbox/symbolic/maplemex.mexglx.
/usr/local/matlab/bin/glnx86/libmaple.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
??? Invalid MEX-file '/usr/local/matlab/toolbox/symbolic/maplemex.mexglx': .

解决方法正如10所说,如同LZ的第9步中的方法,
加入export LD_ASSUME_KERNEL=2.4.1,设置这个环境变量
littleUbuntu
帖子: 1103
注册时间: 2006-10-19 9:02

#12

帖子 littleUbuntu » 2007-01-11 17:02

怎么刚才没有顶上,再来一次。
头像
ztyt110
帖子: 43
注册时间: 2006-11-17 10:13
来自: NUAA (nanjing) china
联系:

#13

帖子 ztyt110 » 2007-01-11 18:24

我把这条也加进原文吧,供别人参考,
我是单独装了maple,不太需要这个。

感谢10楼
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#14

帖子 skyx » 2007-01-11 18:34

what a pity ,get不了
no security measure is worth anything if an attacker has physical access to the machine
i3oson
帖子: 8
注册时间: 2006-06-06 23:52

#15

帖子 i3oson » 2007-02-09 15:01

大家谁有 R2006b 的 license.lic ,请贴出来一下,我在eMule上下的 镜像的 crack 里是 license_locked.dat 和 license_server.dat ,没有 license.lic。到底应该怎样处理呢?

谢谢
回复