无法摆脱错误"/ usr/bin/ld:找不到-lncurses"

bee*_*der 7 android python-2.7 ubuntu-12.04

我想运行命令:

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

得到以下输出:

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

因此,要解决上述,我尝试使用readline的命令来安装pip install readlineeasy_install readline,但无论是命令输出如下:

/usr/bin/ld: cannot find -lncurses

collect2: ld returned 1 exit status

error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

我有ubuntu 12.04与python 2.7.3并且想要构建android源代码.

我搜索了很多东西来修复它但没有成功......有人能指出我缺少的东西吗?

小智 15

sudo apt-get install libncurses5-dev
Run Code Online (Sandbox Code Playgroud)

然后重新运行命令


Nik*_*kov 0

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