首頁>技術>

提示錯誤: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 foundscripts/Makefile.build:192: recipe for target 'applets/applets.o' failedmake[1]: * [applets/applets.o] Error 127Makefile:701: recipe for target 'applets' failedmake: * [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.oIn file included from include/busybox.h:10, from applets/applets.c:16:include/libbb.h:15: error: syntax error before '<' tokenIn 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 '}' tokenapplets/applets.c: In function get_trimmed_slice':applets/applets.c:102: warning: implicit declaration of functionisspace'scripts/Makefile.build:192: recipe for target 'applets/applets.o' failedmake[1]: * [applets/applets.o] Error 1Makefile:701: recipe for target 'applets' failedmake: * [applets] Error 2  原因:缺少必要標頭檔案 解決辦法:修改busybox中的原始碼:include/libbb.h 中,增加一行#include <sys/resource.h>。

16
最新評論
  • BSA-TRITC(10mg/ml) TRITC-BSA 牛血清白蛋白改性標記羅丹明
  • VCODE修改控制檯編碼格式解決輸出亂碼問題