7

I wanted to run the command:

repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r6

and got the following output:

Traceback (most recent call last): File "/home/anu/bin/repo", line 91, in <module> import readline ImportError: No module named readline

So to fix the above, I tried to install readline using commands pip install readline and easy_install readline, but both the commands outputs the following:

/usr/bin/ld: cannot find -lncurses

collect2: ld returned 1 exit status

error: command 'gcc' failed with exit status 1

I have ubuntu 12.04 with python 2.7.3 and want to build android source code.

I searched a lot to fix it but no success... Can anybody point to me what I am missing?

4

3 回答 3

16
sudo apt-get install libncurses5-dev

然后重新运行你的命令

于 2013-04-22T09:09:39.897 回答
0

我通过安装 python 2.7 解决了上述问题。猜猜 repo 与以前版本的 python 而不是当前版本 2.7.3 一起工作正常。

于 2012-12-26T20:49:11.867 回答
0

如果您运行的是 64 位操作系统,则可能必须安装 i386 版本的库。很多(全部?)Android 主机命令都是 32 位的。

于 2012-12-18T02:31:24.560 回答