請教下:
redhat 5.3 64位的系統
系統內建的python 2.4.3箭頭和退格正常使用
#python
Python 2.4.3 (#1, Sep 17 2008, 16:07:0
[GCC 4.1.2 20071124 (Red Hat 4.1.2-41)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> daf
但自訂安裝的python 2.7.1退格鍵和箭頭無法正常使用,如下:
#python
Python 2.4.3 (#1, Sep 17 2008, 16:07:0
[GCC 4.1.2 20071124 (Red Hat 4.1.2-41)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> daf ^H^[[D
google搜尋,有所終端問題的。但更多說是readline庫的問題。
但在系統裡是能找到readline庫的:
# ll /usr/lib/libreadline.so.5*
lrwxrwxrwx 1 root root 18 Mar 12 02:57 /usr/lib/libreadline.so.5 -> libreadline.so.5.1
-rwxr-xr-x 1 root root 208808 Jul 13 2006 /usr/lib/libreadline.so.5.1
有點無法理解。
後重新編譯、安裝,發現make install的時候,最後確實提示缺少readline庫:
----------------------------------------------------------------------------------------------------------------
Python build finished, but the necessary bits to build these modules were not found:
_bsddb _curses _curses_panel
_sqlite3 _tkinter bsddb185
bz2 dbm dl
gdbm imageop sunaudiodev readline
----------------------------------------------------------------------------------------------------------------
請教同事,瞭解到這個應該是缺少readline的開發包,安裝之:
yum install readline-devel.x86_64
再重新configure、make、make install,搞定!!