ubuntu14.04編android2.3.1的一些坑

一、 linux

apt-cache policy name
得到已安裝的name 的version

二、android 2.3.1在ubuntu14.04上編譯的錯誤 android

*gcc 不對:安裝4.4的gcc和g++ git

*Zgnote.c報錯:用下面的patch shell

diff --git a/vm/native/dalvik_system_Zygote.c b/vm/native/dalvik_system_Zygote.c
index bcc2313..112563a 100644
--- a/vm/native/dalvik_system_Zygote.c
+++ b/vm/native/dalvik_system_Zygote.c
@@ -21,6 +21,7 @@
 #include "native/InternalNativePriv.h"
 
 #include <signal.h>
+#include <sys/resource.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <grp.h> ubuntu

*/usr/bin/ld: cannot find -lcurse ui

apt-get install lib32ncurses5     this

*/usr/bin/ld: cannot find -lz es5

sudo apt-get install lib32z1-dev spa

*/usr/include/zlib.h:34:19: fatal error: zconf.h: 沒有那個文件或目錄 code

有一處少了一個頭文件,緣由是zlib1g-dev有個頭文件修改了路徑,及zconf.h放到了/usr/include/x86_64-linux-gnu/,因此將其拷貝到/usr/include/下便可了

*Can't locate Switch.pm in

sudo apt-get install libswitch-perl

*Unknown parameter

gcc版本過高,用update-alternative配置一下

*In file included from /usr/include/stdlib.h:24,
                 from build/tools/acp/acp.c:11:
/usr/include/features.h:374: fatal error: sys/cdefs.h: No such file or directory

sudo apt-get install libc6-dev-i386

G++: selected multilib '32' not installed.
Problem when installing CACTI
G++: selected multilib '32' not installed.
Install the multilib for g++
In Ubuntu, we just input 


 sudo apt-get install g++-multilib
However, the g++ we use is not the latest version, it is g++ - 4.4, so we should also install this. 
Just 
 sudo apt-get install g++-4.4-multilib
相關文章
相關標籤/搜索