zoukankan      html  css  js  c++  java
  • 自定义安装python,退格,方向键无法正常使用(转)

    请教下:
    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,搞定!!

  • 相关阅读:
    10个有用的网站访问分析工具
    在 IIS6 ASP.NET 4.0 安装 最常遇到的四个问题
    [转]qUIpt:JavaScript Cache Library
    Windows Phone 7 Jump Start
    TFS GrantBackup Plan Permissions Error
    JQuery 专题
    IEnumberable<String> To String
    Charts Controls 开发系列2
    Script#
    SQL SERVER 经验、资料收录
  • 原文地址:https://www.cnblogs.com/qq78292959/p/2907722.html
Copyright © 2011-2022 走看看