linux系统内核版本:2.6.32-358.el6.x86_64(在64位系统上安装32位程序需要另外安装一些库)
arm-linux-gcc版本:本文安装的是友善之臂tiny6410光盘中自带的arm-linux-gcc-4.5.1-v6-vfp-20101103.tgz
 
1. 创建工作目录/opt/FriendlyARM/tools/arm-linux-gcc-4.5.1
 
2. 解压arm-linux-gcc-4.5.1-v6-vfp-20101103.tgz到/opt/FriendlyARM/tools/arm-linux-gcc-4.5.1
 
3. 将编译器路径系统环境变量
vim /root/.bashrc
在最后添加
export PATH=$PATH:/opt/FriendlyARM/tools/arm-linux-gcc-4.5.1/bin
 
4. 重启系统
 
5. 查看arm-linux-gcc版本
arm-linux-gcc -v
错误提示:
-bash: ./arm-linux-gcc: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
解决方法:
yum whatprovides ld-linux.so.2
从打印信息中得知缺少库glibc-2.12-1.132.el6.i686
yum install glibc-2.12-1.132.el6.i686
再次执行arm-linux-gcc -v可正常显示
 
6. 编译测试代码
arm-linux-gcc -o test test.c
错误提示:
/opt/FriendlyARM/tools/arm-linux-gcc-4.5.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
解决方法:
yum whatprovides libz.so.1
从打印信息中得知缺少库zlib-1.2.3-29.el6.i686
yum install zlib-1.2.3-29.el6.i686
再次编译可通过。

建立交叉编译环境(arm-linux-gcc)的更多相关文章

  1. ubuntu14.04建立交叉编译环境, 注意事项

    ubuntu14.04建立交叉编译环境, 注意事项 ~$ arm-linux-gcc/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-gcc: 15: e ...

  2. 使用scratchbox2建立交叉编译环境

    使用scratchbox2建立交叉编译环境,使交叉编译不再烦人..... os:ubuntu 12.04.4 x64 1. 安装相关工具sudo apt-get install debootstrap ...

  3. Ubuntu12.4 64位 安装 arm linux gcc 4.3.2

    一.下载arm linux gcc 4.3.2 http://pan.baidu.com/share/link?shareid=1575352696&uk=2754759285&fid ...

  4. 编译android源码官方教程(2)建立编译环境「linux & mac osx」

    https://source.android.com/source/initializing.html Establishing a Build Environment IN THIS DOCUMEN ...

  5. ubuntu16.04(64位)建立交叉编译环境,并配置编译内核

    安装步骤 1.准备工具安装目录 将压缩包gcc-linaro-arm-linux-bnueabihf-4.9-2014.07_linux.tar存放在一个目录下,这个目录就是你等会解压缩的目录,以后这 ...

  6. Ubuntu系统建立交叉编译环境

    飞凌 FET6818核心板 解压编译器: tar zxvf arm-cortex_a9_eabi-4.7-eglibc-2.18.tar.gz  -C/opt 设置默认编译环境: vi /etc/pr ...

  7. 建立ARM交叉编译环境 (arm-none-linux-gnueabi-gcc with EABI)【转】

    转自:http://lib.csdn.net/article/embeddeddevelopment/60172?knId=886 建立ARM交叉编译环境 (arm-none-linux-gnueab ...

  8. Ubuntu12.04下arm交叉编译环境的建立

    http://blog.csdn.net/heyangya2009/article/details/5424376 备注:ubuntu12.04+Android+Real6410 在主机上用来编译其他 ...

  9. 从头编译ARM交叉编译环境

    首先Cygwin需安装基本的命令 例如make binutils gcc 还有diffutils 没有他会报找不到cmp命令 这些都可以在setup.exe中找到 编译gcc时,需要注意一个原则:不要 ...

随机推荐

  1. Python从2.6升级到2.7,使用pip安装module,报错:No Module named pip.log(转载)

    From:http://blog.csdn.net/iefreer/article/details/8086834 python升级后,使用pip安装module,错误: 错误原因:版本升级后,之前的 ...

  2. 拥抱 Android Studio 之五:Gradle 插件开发

    实践出真知 笔者有位朋友,每次新学一门语言,都会用来写一个贪吃蛇游戏,以此来检验自己学习的成果.笔者也有类似体会.所谓纸上得来终觉浅,绝知此事要躬行.这一章,笔者将以开发和发布一个 Gradle 插件 ...

  3. Redis使用详细教程(转)

    一.Redis基础部分: 1.redis介绍与安装比mysql快10倍以上 *****************redis适用场合**************** 1.取最新N个数据的操作 2.排行榜应 ...

  4. C++学习4

    在C++中,定义函数时可以给参数指定一个默认的初始值.调用函数时,可以省略有默认值的参数.也就是说,如果用户指定了参数的值,那么就使用用户指定的值,否则使用参数的默认值. C++规定,默认参数只能放在 ...

  5. linux secureCRT utf-8编码显示

    secureCRT 会话选项-终端-外观-字符编码: 下拉选择UTF-8 关闭当前secureCRT,另开一个新的让设置生效,显示正常.

  6. Spring配置项<context:annotation-config/>说明

    配置applicationContext.xml时经常会看到: <context:annotation-config/> 它的作用是隐式地向Spring容器注册AutowiredAnnot ...

  7. SQL 获取各表记录数的最快方法

    select distinct o.name,i.rows from sysobjects o,sysindexes  i where o.id=i.id and o.Xtype= 'U' and i ...

  8. 2015 Multi-University Training Contest 6 Cake

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5355 Problem Description There are m soda and today i ...

  9. 11g RMAN Restore archivelog用法

    I.备份所有归档日志文件 RMAN> BACKUP FORMAT '/u01/backup/arch_%U_%T' skip inaccessible filesperset 5 ARCHIVE ...

  10. oracle参数open_cursors和session_cached_cursor详解!

    SQL> show parameter open_cursors           --每个session(会话)最多能同时打开多少个cursor(游标) NAME               ...