2011-07-26 45 views

回答

0

嘗試安裝libreadline5-dev

0

readline的是暫無數據becase的用出來的ReadLine模組安裝蟒蛇。你需要用readline重新編譯你的Python。你可以這樣做,祝你好運!

$源Install_Python2.7.5.sh

shell腳本 「Install_Python2.7.5.sh」 是這樣的:

#!/bin/bash 

sudo apt-get install libreadline-dev 

sudo aptitude install build-essential libreadline5-dev 

sudo apt-get install libbz2-dev 

if [ ! -d ~/software/Python/Python-2.7.5 ]; then 

    mkdir ~/software 
    mkdir ~/software/Python 
    mkdir ~/software/Python/Python-2.7.5 
fi 

if [ ! -d ~/bin ]; then 

    mkdir ~/bin 
fi 

user_root=~ 

echo $user_root 

echo "unpackage Python-2.7.5.tar.bz2..." 

tar -jxvf Python-2.7.5.tar.bz2 

echo "prepear to install Python-2.7.5" 

cd Python-2.7.5 

sed -i "s/#readline/readline/g" Modules/Setup.dist 

echo "Start to install Python-2.7.5" 

./configure --prefix=$user_root/software/Python/Python-2.7.5/ && make && make install 

echo "Make symbol link" 

ln -s -f $user_root/software/Python/Python-2.7.5/bin/* $user_root/bin 

echo "Set environment variable" 

PATH=$user_root/bin:$PATH