提示错误:

arm-linux-gcc:Command not found

PATH里有/usr/oca/arm/bin,但是make的时候,就是找不到 arm-linux-gcc

原因:

export PATH=$PATH:/usr/local/arm/bin是设置当前用户的PATH,而sudo执行make的时候,使用的是超级用户权限,那也就使用了超级用户的PATH(但是这个PATH里,并没有/usr/ local/arm/bin)

解决办法

先打开一个超级用户权限的

sudo -s

在当前模式下,设置环境变量export PATH=$PATH /usr/local/arm/bin,再进入到busybox目录, make CONFIG_PREFIX=/work/nfs_root/first_fs install,就成功安装busybox了。

提示错误:

/home/book/work/busybox-1.7.0/scripts/gcc-version.sh: line 11: arm-linux-gcc: command not found

/home/book/work/busybox-1.7.0/scripts/gcc-version.sh: line 11: arm-linux-gcc: command not found

CC applets/applets.o

/bin/sh: 1: arm-linux-gcc: not found

scripts/Makefile.build:192: recipe for target 'applets/applets.o' failed

make[1]: *** [applets/applets.o] Error 127

Makefile:701: recipe for target 'applets' failed

make: *** [applets] Error 2

原因:

交叉编译器的绝对路径与相对路径问题

解决办法

在busybox的顶层Makefile 176行 CROSS COMPILE ?= 中添加/work/tools/gcc-3.4.5-glibc-2.3.6/bin/arm-linux-的绝对路径就成功了。(为什么以前用arm-linux-就可以自己找到?)

提示错误:

CC applets/applets.o

In file included from include/busybox.h:10,

from applets/applets.c:16:

include/libbb.h:15: error: syntax error before '<' token

In file included from /work/tools/gcc-3.4.5-glibc-2.3.6/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/sys-include/dirent.h:62,

from include/libbb.h:16,

from include/busybox.h:10,

from applets/applets.c:16:

/work/tools/gcc-3.4.5-glibc-2.3.6/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/sys-include/bits/dirent.h:35: error: syntax error before '}' token

applets/applets.c: In function get_trimmed_slice': applets/applets.c:102: warning: implicit declaration of function isspace'

scripts/Makefile.build:192: recipe for target 'applets/applets.o' failed

make[1]: *** [applets/applets.o] Error 1

Makefile:701: recipe for target 'applets' failed

make: *** [applets] Error 2

原因:

缺少必要头文件

解决办法

修改busybox中的源码:include/libbb.h 中,增加一行#include <sys/resource.h>。

有任何问题,均可通过公告中的二维码联系我

编译busybox错误汇总的更多相关文章

  1. 编译busybox错误

    为了制作一个文件系统,首先要用busybox编译出文件系统所需要的应用程序.在下载了busybox-1.13.0.tar.bz2后,编译出现如下错误: In file included from /o ...

  2. php各种编译错误汇总

    PHP编译安装时常见错误解决办法,php编译常见错误 This article is post on https://coderwall.com/p/ggmpfa configure: error: ...

  3. Entity Framework学习笔记——错误汇总

    之前的小项目做完了,到了总结经验和更新学习笔记的时间了.开始正题之前先啰嗦一下,对之前的学习目标进行一个调整:“根据代码生成表”与“生成数据库脚本和变更脚本”合并为“Code First模式日常使用篇 ...

  4. Python常见的错误汇总

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 错误: [错误分析]第二个参数必须为类,否则会报TypeError,所以正确的应 ...

  5. Quartus II 中 Verilog 常见警告/错误汇总

    Verilog 常见错误汇总 1.Found clock-sensitive change during active clock edge at time <time> on regis ...

  6. Linux下编译busybox时出现的问题

    编译busybox的时候出现了一个问题: sync.c:(.text.sync_main+0x78): undefined reference to `syncfs' collect2: ld ret ...

  7. android studio 错误汇总以及解决办法

    android studio 错误汇总以及解决办法  参考 https://www.jianshu.com/p/7c7de6562231 问题1. Error:Execution failed for ...

  8. 李洪强iOS开发之OC常见错误汇总

    // //  main.m //  16 - 常见错误汇总 // //  Created by vic fan on 16/7/13. //  Copyright © 2016年 李洪强. All r ...

  9. jasperreport报表生成时编译的错误

    在帮徐老板解决一个jasperreport报表生成时编译的错误: 刚开始时,加上他所给的 jar 包之后,错误显示为: net.sf.jasperreports.engine.JRException: ...

  10. PHP常见错误汇总

    日常开发和调试的时候,经常会遇到一些错误,光怪陆离的不知所以,所以,特此将错误汇总一下,借鉴!!! 1. 原因分析:  一般可能是该文件出现了问题,检查一下代码和格式,是否出现开始的地方出现了空格,或 ...

随机推荐

  1. 【UniApp】-uni-app-内置组件

    前言 好,经过上个章节的介绍完毕之后,了解了一下 uni-app-全局数据和局部数据 那么了解完了uni-app-全局数据和局部数据之后,这篇文章来给大家介绍一下 UniApp 中内置组件 首先不管三 ...

  2. Linux下^m符号删除

    Linux下^m符号删除 从Windows上复制的代码到Linux尾会有M字符,通过下命令可以删除. :%s/\r//

  3. 文心一言 VS 讯飞星火 VS chatgpt (154)-- 算法导论12.3 1题

    一.用go语言,给出 TREE-INSERT 过程的一个递归版本. 文心一言,代码不能运行: 下面是用 Go 语言实现一个递归版本的 TREE-INSERT 过程的代码: package main i ...

  4. CompletableFuture入门

    CompletableFuture入门 1.Future vs CompletableFuture 1.1 准备工作 先定义一个工具类 import java.nio.file.Files; impo ...

  5. transformer模型

    Transformer由谷歌团队在论文<Attention is All You Need>提出,是基于attention机制的模型,最大的特点就是全部的主体结构均为attention. ...

  6. python tkinter 使用(二)

    python tkinter 使用(二) 本篇文章着重讲下tkinter中messagebox的使用. 1:提示框 def showinfo(event): messagebox.showinfo(& ...

  7. vue 2实战系列 —— 复习Vue

    复习Vue 近期需要接手 vue 2的项目,许久未写,语法有些陌生.本篇将较全面复习 vue 2. Tip: 项目是基于 ant-design-vue-pro ant-design-vue-pro 由 ...

  8. Jenkins 系列:Jenkins 安装(Windows、Mac、Centos)和简介

    目录 简介 发展历史 应用场景 Jenkins 安装部署 先决条件 硬件要求 软件包下载 war 包部署 linux 系统部署 mac 系统部署 windows 系统部署 安装后基本配置 解锁 自定义 ...

  9. C realloc(): invalid next size错误

    C realloc(): invalid next size 问题代码 #include <stdio.h> #include <stdlib.h> int *getNumbe ...

  10. Linux集群存储配置

    RH436_EX集群 介绍Linux环境下集群架构,Linux开源集群软件的安装及配置使用,软件与软件之间的组合.实现高可用集群,负载均衡集群;负载均衡.高可用集群与存储集群间的多集群混合架构使用. ...