交叉编译器arm-linux-gcc的安装
2010-05-22 15:59
375 查看
在嵌入式开发中我们经常会用到arm-linux-gcc来编译我们的应用程序。安装arm-linux-gcc步骤如下:
1、将arm-linux-gcc的压缩包arm-linux-gcc-4.3.3.tar.bz2 解压缩;
2、修改环境变量
具体步骤如下:
1)[root@cxp opt]# tar xvfj /mnt/hgfs/Linux/arm-linux-gcc-4.3.3.tar.bz2 -C /opt/
2)[root@cxp opt]#gedit /etc/profile
将会打开profile 文件,在如下图:
![]( <a href='http://hi.csdn.net/attachment/201005/22/0_1274514359PHJM.gif' target='_blank'>http://hi.csdn.net/attachment/201005/22/0_1274514359PHJM.gif</a> )
在最后一行加入如下图中的最后一行字符:
![](http://hi.csdn.net/attachment/201005/22/0_1274514661zVzL.gif )
最后一行路径是你刚才解压arm-linux-gcc的存放路径中的bin路径
3)[root@cxp opt]#source /etc/profile
4)[root@cxp opt]#arm-linux-gcc -v (测试)
关于上文的一些资料:
1、 etc/profile 这个文件是每个用户登录时都会运行的环境变量设置
3、source命令通常用于重新执行刚修改的初始化文件,使之立即生效,而不必注销并重新登录。
4、与环境变量相关的文件可能还会有/etc/bashrc等,不过这是shell变量,是局部的,对于特定的shell器作用。而/etc/profile是全局的,适用于所有的shell。
2、 profile 文件会告诉shell使用什么语言,什么shell,命令的搜索路径等等。
1、将arm-linux-gcc的压缩包arm-linux-gcc-4.3.3.tar.bz2 解压缩;
2、修改环境变量
具体步骤如下:
1)[root@cxp opt]# tar xvfj /mnt/hgfs/Linux/arm-linux-gcc-4.3.3.tar.bz2 -C /opt/
2)[root@cxp opt]#gedit /etc/profile
将会打开profile 文件,在如下图:
![]( <a href='http://hi.csdn.net/attachment/201005/22/0_1274514359PHJM.gif' target='_blank'>http://hi.csdn.net/attachment/201005/22/0_1274514359PHJM.gif</a> )
在最后一行加入如下图中的最后一行字符:
![](http://hi.csdn.net/attachment/201005/22/0_1274514661zVzL.gif )
最后一行路径是你刚才解压arm-linux-gcc的存放路径中的bin路径
3)[root@cxp opt]#source /etc/profile
4)[root@cxp opt]#arm-linux-gcc -v (测试)
关于上文的一些资料:
1、 etc/profile 这个文件是每个用户登录时都会运行的环境变量设置
3、source命令通常用于重新执行刚修改的初始化文件,使之立即生效,而不必注销并重新登录。
4、与环境变量相关的文件可能还会有/etc/bashrc等,不过这是shell变量,是局部的,对于特定的shell器作用。而/etc/profile是全局的,适用于所有的shell。
2、 profile 文件会告诉shell使用什么语言,什么shell,命令的搜索路径等等。
相关文章推荐
- 安装arm-linux-gcc-4.4.3交叉编译器的方法
- Ubuntu 12.10安装交叉编译器arm-none-linux-gnueabi-gcc
- CentOS安装arm-linux-gcc交叉编译器(linux的CentOS配置环境变量)
- CentOS安装arm-linux-gcc交叉编译器
- 安装交叉编译器arm-linux-gcc:(备忘)
- 安装交叉编译器arm-none-linux-gnueabi-gcc
- ubuntu10.4安装交叉编译器arm-none-linux-gnueabi-gcc
- 在ubuntu下安装交叉编译器arm-linux-gcc步骤
- 安装交叉编译器arm-linux-gcc的安装
- arm-linux-gcc-3.4.1交叉编译器在redhat9.0下的安装(VMware)
- ubuntu12.10安装交叉编译器arm-none-linux-gnueabi-gcc
- ubuntu10.4安装交叉编译器arm-none-linux-gnueabi-gcc
- ubunutu16.4 64位安装arm-linux-gcc交叉编译器
- 【嵌入式linux】(第二步):安装交叉编译器(arm-linux-gcc)以及集成开发环境(eclipse)
- 安装gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi交叉编译器
- 安装交叉编译器后,无法执行arm-linux-gcc -v
- 交叉编译器arm-linux-gcc-4.4.3安装
- arm-Linux-gcc-4.3.2 交叉编译器的安装
- 【嵌入式linux】(第二步):安装交叉编译器(arm-linux-gcc)以及集成开发环境(eclipse)
- 安装交叉编译器arm-linux-gcc