主题 : 交叉编译问题,请高手指点 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 1084
精华: 0
发帖: 40
金钱: 345 两
威望: 41 点
综合积分: 80 分
注册时间: 2008-07-16
最后登录: 2010-11-17
楼主  发表于: 2008-07-21 09:05

 交叉编译问题,请高手指点

本人装的是双操作系统,LINUX为Fedora 6
按照手册上的步骤解压了那三个文件,并且修改了bashrc文件,并且系统也重启了,可是输入
arm-linux-gcc -v后提示command not found
请问我该怎么做啊,谢谢!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2008-07-21 10:53
引用楼主blackswan于2008-07-21 09:05发表的 交叉编译问题,请高手指点 :
本人装的是双操作系统,LINUX为Fedora 6
按照手册上的步骤解压了那三个文件,并且修改了bashrc文件,并且系统也重启了,可是输入
arm-linux-gcc -v后提示command not found
请问我该怎么做啊,谢谢!


光凭这些信息我想没人会知道究竟出了什么问题的
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 1084
精华: 0
发帖: 40
金钱: 345 两
威望: 41 点
综合积分: 80 分
注册时间: 2008-07-16
最后登录: 2010-11-17
2楼  发表于: 2008-07-21 15:45
[root@localhost ~]# arm-linux-gcc -v
bash: arm-linux-gcc: command not found
级别: 新手上路
UID: 1084
精华: 0
发帖: 40
金钱: 345 两
威望: 41 点
综合积分: 80 分
注册时间: 2008-07-16
最后登录: 2010-11-17
3楼  发表于: 2008-07-21 15:53
先解压文件
#tar xvzf arm-linux-gcc-3.3.2.tgz –C /
#tar xvzf arm-linux-gcc-2.95.3.tgz –C /
#tar xvzf arm-linux-gcc-3.4.1.tgz –C /
再更改文件
#gedit /root/.bashrc
重启之后输入命令
[root@localhost ~]# arm-linux-gcc -v
得到的结果是
bash: arm-linux-gcc: command not found
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2008-07-22 07:18
引用第3楼blackswan于2008-07-21 15:53发表的  :
先解压文件
#tar xvzf arm-linux-gcc-3.3.2.tgz –C /
#tar xvzf arm-linux-gcc-2.95.3.tgz –C /
#tar xvzf arm-linux-gcc-3.4.1.tgz –C /
再更改文件
.......

如果你不想了解PATH环境变量的含义的话,最简单的方法是解压后直接用
/usr/local/arm/3.4.1/bin/arm-linux-gcc
保证不会错:)
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 1084
精华: 0
发帖: 40
金钱: 345 两
威望: 41 点
综合积分: 80 分
注册时间: 2008-07-16
最后登录: 2010-11-17
5楼  发表于: 2008-07-22 09:12
没有用的,我在/usr/local/arm/3.4.1/bin目录下运行这条命令也是出现同样的问题
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2008-07-22 11:25
Linux默认不会从当前目录搜索可执行档,如果你要在/usr/local/arm/3.4.1/bin下面执行arm-linux-gcc的话,需要用./arm-linux-gcc
不过你最好先ls -l /usr/local/arm/3.4.1/bin确认一下交叉编译器正确解压在那里了
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 1084
精华: 0
发帖: 40
金钱: 345 两
威望: 41 点
综合积分: 80 分
注册时间: 2008-07-16
最后登录: 2010-11-17
7楼  发表于: 2008-07-26 14:27
谢谢!