Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2691575
  • 博文数量: 505
  • 博客积分: 1552
  • 博客等级: 上尉
  • 技术积分: 2514
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-23 18:24
文章分类

全部博文(505)

文章存档

2019年(12)

2018年(15)

2017年(1)

2016年(17)

2015年(14)

2014年(93)

2013年(233)

2012年(108)

2011年(1)

2009年(11)

分类: LINUX

2012-11-20 09:05:11

【本文为OurUnix--Linux's境原创,转载请注明源地址】

        一些刚做嵌入式开发的筒子一般没有自己的交叉编译工具,网上添加交叉编译工具的教程虽多,但是太繁琐了,这里境跟大家讲下,怎么利用ubuntu里面的apt-get工具快速安装我们自己的交叉编译工具的。(当然肯定有童鞋已经直接sudo apt-get install gcc-armxxx了,可是一直都无济于事,原因是什么?)

1,添加一个源到我们的/etc/apt/sources.list下,这样我么才可以sudo apt-get install gcc-armxxx

        源地址:deb stable main

        将上面的地址加到我们的/etc/apt/sources.list下;

        手动将 deb stable main添加到 /etc/apt/sources.list 一般用户的权限是不够的,所以需要在你的 编辑器前加上sudo的呢。

2,千万别忘了

        sudo apt-get update

3.更新成功后

        sudo apt-get install gcc-4.4-arm-linux-gnueabi

        Ok,如果有什么问题,请跟贴联系。

4,境在执行第二步的时候,遇到这样的问题:

        sudo apt-get update

W: GPG error: stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B5B7720097BB3B58
解决办法:

        sudo apt-get install emdebian-archive-keyring

        sudo apt-get update

补充:有人在sudo apt-get install gcc-4.4-arm-linux-gnueabi时,遇到了这样的问题:

@ubuntu:~$ sudo apt-get install gcc-4.3-arm-linux-gnueabi
Reading package lists... Done
Building dependency tree      
Reading state information... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  gcc-4.3-arm-linux-gnueabi: Depends: gcc-4.3-arm-linux-gnueabi-base (= 4.3.5-4) but it is not going to be installed
                             Depends: cpp-4.3-arm-linux-gnueabi (= 4.3.5-4) but it is not going to be installed
                             Depends: binutils-arm-linux-gnueabi (>= 2.19.1) but it is not going to be installed
                             Recommends: libc6-dev-armel-cross (>= 2.5) but it is not going to be installed
  libmpfr4: Depends: libgmp10 but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

既然遇到了这个犯人的问题,那我们只好硬着头皮去解决了,解决办法:

@ubuntu:~$ sudo apt-get install libc6-dev-armel-cross

@ubuntu:~$ sudo apt-get install binutils-arm-linux-gnueabi

安装libmpfr4,下载地址:

@ubuntu:~$sudo dpkg -i libmpfr4_3.0.0-9_i386.deb

@ubuntu:~$ sudo apt-get install cpp-4.3-arm-linux-gnueabi  

安装libgmp10,下载地址:

@ubuntu:~$sudo dpkg -i libgmp10_5.0.1+dfsg-7_i386.deb

@ubuntu:~$ sudo apt-get install gcc-4.3-arm-linux-gnueabi-base

@ubuntu:~$sudo apt-get install gcc-4.4-arm-linux-gnueabi

大功告成。。。。。。

输入arm,然后自动补全,这下应该出来了,累死了。

阅读(1898) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~