repo: ImportError: No module named readline问题解决

运行: repo init -u https://android.googlesource.com/platform/manifest时遇到如下错误:
Traceback (most recent call last):
File "./repo", line 91, in 
import readline
ImportError: No module named readline

解决方法:

这是因为你安装的python没有readline模块,需安装一下。

1):需要下载readline-6.2.1.tar.gz

2):安装readline-6.2.1时,下载

cd readline-6.2

./configure

vi Makefile

如果是64位系统,添加64位编译:CFLAGS = -g -O -fPIC

make

sudo make install

2):重新编译Python

cd Python-2.6.6

sudo make install

 

问题解决

 如果出现xmllint: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: PC问题,则

sudo rm -fr /usr/local/lib/libreadline.so.6



你可能感兴趣的:(Linux,shell)