Android4.0源码编译方法以及错误解决
2012-10-21 17:19:23 来源:WEB开发网核心提示: 错误代码 解决方法 /usr/bin/ld: skipping incomp
错误代码
|
解决方法
|
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.1/../../../libncurses.so when searching for -lncurses
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.1/../../../libncurses.a when searching for -lncurses
/usr/bin/ld: skipping incompatible /usr/lib/libncurses.so when searching for -lncurses
/usr/bin/ld: skipping incompatible /usr/lib/libncurses.a when searching for -lncurses
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
|
apt-get install lib32ncurses5-dev
|
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl]
Error 1 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++ collect2: ld returned 1 exit status
其找不到libstdc++
|
apt-get install g++-multilib
|
-o out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt -lz -lrt
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz /usr/bin/ld: skipping incompatible
/usr/lib/libz.a when searching for -lz /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
其找不到libz
|
apt-get install lib32z1-dev
|
致命错误: zlib.h:没有那个文件或目录
|
执行 sudo apt-get install zlib1g-dev
|
致命错误: jpeglib.h:没有那个文件或目录
|
执行 sudo apt-get install libjpeg-dev
|
致命错误: png.h:没有那个文件或目录
|
执行 sudo apt-get install libpng
|
致命错误: curses.h:没有那个文件或目录
|
sudo apt-get install libncurses5-dev
|
致命错误: ft2build.h:没有那个文件或目录
|
sudo apt-get install libxft2-dev
|
致命错误: GL/glx.h:没有那个文件或目录 和 致命错误: X11/extensions/shape.h:没有那个文件或目录
|
sudo apt-get install libgl1-mesa-dev
|
/usr/bin/ld: cannot find -lGL
|
先删掉/usr/lib/i386_linux-gnu/libGL.so,然后
sudo ln -s /usr/lib/i386_linux-gnu/mesa/libGL.so.1 /usr/lib/i386_linux-gnu/libGL.so
一定要确保/usr/lib/i386_linux-gnu/libGL.so的链接目标是i386_linux-gnu/mesa/libGL.so.1
|
/bin/bash: java: command not found
|
sudo ln -s /usr/java/jdk1.6.0_35/bin/jar /bin/jar
sudo ln -s /usr/java/jdk1.6.0_35/bin/java /bin/java
sudo ln -s /usr/java/jdk1.6.0_35/bin/javac /bin/javac
sudo ln -s /usr/java/jdk1.6.0_35/bin/javah /bin/javah
sudo ln -s /usr/java/jdk1.6.0_35/bin/javadoc /bin/javadoc
|
Java: NFCDemo (out/target/common/obj/APPS/NFCDemo_intermediates/classes)
collect2: ld terminated with signal 9 [Killed]
|
将虚拟机内存调整为2G或者更多
|
NAND:could not open file system.img
|
Sudo chomod 777 system.img
|
|
更多精彩
赞助商链接