天天看点

ububtu14.04安装arm-none-eabi-gcc

1 问题描述

采用命令apt install gcc-arm-none-eabi进行安装,安装完成后,使用make指令进行编译,出现如下问题:

arm-none-eabi-gcc: error: nano.specs: No such file or directory

显示没有nano.specs这个文件

浏览到如下页面

https://stackoverflow.com/questions/26931979/gnu-arm-nano-specs-not-found

ububtu14.04安装arm-none-eabi-gcc

说不要使用linux命令安装,而使用安装包进行安装,可以解决这个问题

故,先把之前安装的remove掉,使用如下命令:

$ sudo apt-get remove gcc-arm-none-eabi
           

2 arm-none-eabi-gcc安装

1 下载安装包gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2

2 解压,比如解压到了/home/queena文件夹下

3 修改/etc/profile(或者修改~/.bashrc)

vim ~/.bashrc
           

将arm-none-eabi-gcc添加到环境变量

export PATH="$PATH:/home/queena/gcc-arm-none-eabi-7-2017-q4-major/bin"

           
ububtu14.04安装arm-none-eabi-gcc

4 使/etc/profile(或~/.bashrc)修改生效

source /etc/profile (source ~/.bashrc)
           

5 测试arm-none-eabi-gcc安装是否成功

arm-none-eabi-gcc -v
           

6 如果你的系统是64位的却装了32位的arm-none-eabi-gcc可以用以下命令解决

No such file or directory问题.

sudo apt-get install lib32ncurses5 lib32tinfo5 libc6-i386