简体   繁体   中英

cannot get rid of error “/usr/bin/ld: cannot find -lncurses”

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?

sudo apt-get install libncurses5-dev

然后重新运行命令

If you are running an 64 bit OS, you might have to install the i386 versions of the libraries. A lot (all?) of the Android host commands are 32-bit only.

我通过安装python 2.7解决了上述问题.Guess repo适用于以前版本的python而不是当前版本2.7.3。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM