转载:Ubuntu10.10 编译Android2.3源码 遇到的错误

在Ubuntu10.10(64位)编译Android2.3源码时,遇到各种各样的问题。不是缺这个,就是少那个。现把这些问题和解决方法罗列出来,供大家参考。

错误:

/usr/include/gnu/stubs.h:7:27:error:gnu/stubs-32.h:Nosuchfileordirectory

make:***[out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o]错误1

解决:

sudoapt-getinstalllibc6-dev-i386

错误:

make:***[out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp]error1

解决:

sudoapt-getinstallg++-multilib

错误:

external/clearsilver/cgi/cgi.c:22:fatalerror:zlib.h:Nosuchfileordirectory

compilationterminated.

make:***[out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o]Error1

解决:

sudoapt-getinstallzlib1g-dev

错误:

/usr/bin/ld:cannotfind-lz

collect2:ldreturned1exitstatus

make:***[out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt]Error1

解决:

sudoapt-getinstalllib32z1-dev

错误:

bison-d-oout/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cppframeworks/base/tools/aidl/aidl_language_y.y

/bin/bash:bison:commandnotfound

make:***[out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp]Error127

解决:

sudoapt-getinstallbison

错误:

Lex:aidl<=frameworks/base/tools/aidl/aidl_language_l.l

/bin/bash:flex:commandnotfound

make:***[out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp]Error127

解决:

sudoapt-getinstallflex

错误:

/usr/bin/ld:cannotfind-lncurses

collect2:ldreturned1exitstatus

make:***[out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb]Error1

解决:

sudoapt-getinstalllib32ncurses5-dev

错误:

prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:fatalerror:X11/Xlib.h:Nosuchfileordirectory

compilationterminated.

make:***[out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/main-common.o]Error1

解决:

sudoapt-getinstalllibx11-dev

错误:

sh:gperf:notfound

callinggperffailed:32512at./makeprop.plline96.

make:***[out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h]Error25

make:***Deletingfile`out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h'

解决:

sudoapt-getinstallgperf

相关推荐