64位Ubuntu 11.04编译运行Android 2.3其他错误解决
在Ubuntu 11.04(64位)编译Android2.3源码时,遇到各种各样的问题。不是缺这个,就是少那个。现把这些问题和解决方法罗列出来,供大家参考,本人使用的是Ubuntu 11.04(64位)个人版本,非服务器版本。
错误:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] 错误 1
解决:
sudo apt-get install libc6-dev-i386
错误:
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] error 1
解决:
sudo apt-get install g++-multilib
错误:
external/clearsilver/cgi/cgi.c:22: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o] Error 1
解决:
sudo apt-get install zlib1g-dev
错误:
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
解决:
sudo apt-get install lib32z1-dev
错误:
bison -d -o
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp
frameworks/base/tools/aidl/aidl_language_y.y
/bin/bash: bison: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 127
解决:
sudo apt-get install bison
错误:
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/bin/bash: flex: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127
解决:
sudo apt-get install flex
错误:
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
解决:
sudo apt-get install lib32ncurses5-dev
错误:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/Android/main-common.o] Error 1
解决:
sudo apt-get install libx11-dev
错误:
sh: gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 96.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h] Error 25
make:
*** Deleting file
`out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h'
解决:
sudo apt-get install gperf
运行emulat以后错误:
SDL init failure, reason is: No available video device: On Ubuntu64
apt-get install ia32-libs lib32stdc++6
1、在虚拟机上安装64位Ubuntu 10.10,安装完成后进行系统升级。
2、将源代码拷贝进去或者下载下来。
3、sudo apt-get install git-core gnupg flex bison gperf build-essential
zip curl sun-java6-jdk zlib1g-dev gcc-multilib g++-multilib
libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev
lib32readline5-dev lib32z1-dev
4、所有都安装完成后进行编译。
. build/envsetup.sh
make -j4 PRODUCT-generic-eng
不要 choosecombo,否则会有很多莫名其妙的问题。