ubuntu14.04编android2.3.1的一些坑

1、

apt-cache policy name
获得已安装的name 的version

2、android 2.3.1在ubuntu14.04上编译的错误

*gcc 不对:安装4.4的gcc和g++

*Zgnote.c报错:用下面的patch

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>

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

apt-get install lib32ncurses5    

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

sudo apt-get install lib32z1-dev

*/usr/include/zlib.h:34:19: fatal error: zconf.h: 没有那个文件或目录

有一处少了一个头文件,原因是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






转载于:https://my.oschina.net/Cf438NuwHLl/blog/533879

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值