文档章节

pip 安装其他工具报错处理

东方封夜
 东方封夜
发布于 2016/05/11 10:48
字数 950
阅读 97
收藏 0

今天在linux 上用下python 写东西,在python解释器中用回退键和上下左右键的时候报错。。。

然后想到readline插件,于是用pip install readline安装插件,结果报错了,信息如下:

[root@localhost ~]# pip install readline
Collecting readline
  Using cached readline-6.2.4.1.tar.gz
Installing collected packages: readline
  Running setup.py install for readline ... error
    Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yaN9Fr/readline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-LArwHg-record/install-record.txt --single-version-externally-managed --compile:
    
    ============ Building the readline library ============
    
    readline-6.2/
    readline-6.2/doc/
    readline-6.2/doc/Makefile.in
    readline-6.2/doc/texinfo.tex
    readline-6.2/doc/version.texi
    readline-6.2/doc/fdl.texi
    readline-6.2/doc/rlman.texi
    readline-6.2/doc/rltech.texi
    readline-6.2/doc/rluser.texi
    readline-6.2/doc/rluserman.texi
    readline-6.2/doc/history.texi
    readline-6.2/doc/hstech.texi
    readline-6.2/doc/hsuser.texi
    readline-6.2/doc/readline.3
    readline-6.2/doc/history.3
    readline-6.2/doc/texi2dvi
    readline-6.2/doc/texi2html
    readline-6.2/doc/readline.ps
    readline-6.2/doc/history.ps
    readline-6.2/doc/rluserman.ps
    readline-6.2/doc/readline.dvi
    readline-6.2/doc/history.dvi
    readline-6.2/doc/rluserman.dvi
    readline-6.2/doc/readline.info
    readline-6.2/doc/history.info
    readline-6.2/doc/rluserman.info
    readline-6.2/doc/readline.html
    readline-6.2/doc/history.html
    readline-6.2/doc/rluserman.html
    readline-6.2/doc/readline.0
    readline-6.2/doc/history.0
    readline-6.2/doc/readline_3.ps
    readline-6.2/doc/history_3.ps
    readline-6.2/doc/history.pdf
    readline-6.2/doc/readline.pdf
    readline-6.2/doc/rluserman.pdf
    readline-6.2/examples/
    readline-6.2/examples/autoconf/
    readline-6.2/examples/autoconf/BASH_CHECK_LIB_TERMCAP
    readline-6.2/examples/autoconf/RL_LIB_READLINE_VERSION
    readline-6.2/examples/autoconf/wi_LIB_READLINE
    readline-6.2/examples/rlfe/
    readline-6.2/examples/rlfe/ChangeLog
    readline-6.2/examples/rlfe/Makefile.in
    readline-6.2/examples/rlfe/README
    readline-6.2/examples/rlfe/config.h.in
    readline-6.2/examples/rlfe/configure
    readline-6.2/examples/rlfe/configure.in
    readline-6.2/examples/rlfe/extern.h
    readline-6.2/examples/rlfe/os.h
    readline-6.2/examples/rlfe/pty.c
    readline-6.2/examples/rlfe/rlfe.c
    readline-6.2/examples/rlfe/screen.h
    readline-6.2/examples/Makefile.in
    readline-6.2/examples/excallback.c
    readline-6.2/examples/fileman.c
    readline-6.2/examples/manexamp.c
    readline-6.2/examples/readlinebuf.h
    readline-6.2/examples/rl-fgets.c
    readline-6.2/examples/rlcat.c
    readline-6.2/examples/rlevent.c
    readline-6.2/examples/rltest.c
    readline-6.2/examples/rl.c
    readline-6.2/examples/rlptytest.c
    readline-6.2/examples/rlversion.c
    readline-6.2/examples/histexamp.c
    readline-6.2/examples/Inputrc
    readline-6.2/examples/rlwrap-0.30.tar.gz
    readline-6.2/support/
    readline-6.2/support/config.guess
    readline-6.2/support/config.rpath
    readline-6.2/support/config.sub
    readline-6.2/support/install.sh
    readline-6.2/support/mkdirs
    readline-6.2/support/mkdist
    readline-6.2/support/mkinstalldirs
    readline-6.2/support/shobj-conf
    readline-6.2/support/shlib-install
    readline-6.2/support/wcwidth.c
    readline-6.2/shlib/
    readline-6.2/shlib/Makefile.in
    readline-6.2/COPYING
    readline-6.2/README
    readline-6.2/MANIFEST
    readline-6.2/INSTALL
    readline-6.2/CHANGELOG
    readline-6.2/CHANGES
    readline-6.2/NEWS
    readline-6.2/USAGE
    readline-6.2/aclocal.m4
    readline-6.2/config.h.in
    readline-6.2/configure
    readline-6.2/configure.in
    readline-6.2/Makefile.in
    readline-6.2/ansi_stdlib.h
    readline-6.2/chardefs.h
    readline-6.2/history.h
    readline-6.2/histlib.h
    readline-6.2/keymaps.h
    readline-6.2/posixdir.h
    readline-6.2/posixjmp.h
    readline-6.2/readline.h
    readline-6.2/posixselect.h
    readline-6.2/posixstat.h
    readline-6.2/rlconf.h
    readline-6.2/rldefs.h
    readline-6.2/rlmbutil.h
    readline-6.2/rlprivate.h
    readline-6.2/rlshell.h
    readline-6.2/rlstdc.h
    readline-6.2/rltty.h
    readline-6.2/rltypedefs.h
    readline-6.2/rlwinsize.h
    readline-6.2/tcap.h
    readline-6.2/tilde.h
    readline-6.2/xmalloc.h
    readline-6.2/bind.c
    readline-6.2/callback.c
    readline-6.2/compat.c
    readline-6.2/complete.c
    readline-6.2/display.c
    readline-6.2/emacs_keymap.c
    readline-6.2/funmap.c
    readline-6.2/input.c
    readline-6.2/isearch.c
    readline-6.2/keymaps.c
    readline-6.2/kill.c
    readline-6.2/macro.c
    readline-6.2/mbutil.c
    readline-6.2/misc.c
    readline-6.2/nls.c
    readline-6.2/parens.c
    readline-6.2/readline.c
    readline-6.2/rltty.c
    readline-6.2/savestring.c
    readline-6.2/search.c
    readline-6.2/shell.c
    readline-6.2/signals.c
    readline-6.2/terminal.c
    readline-6.2/text.c
    readline-6.2/tilde.c
    readline-6.2/undo.c
    readline-6.2/util.c
    readline-6.2/vi_keymap.c
    readline-6.2/vi_mode.c
    readline-6.2/xfree.c
    readline-6.2/xmalloc.c
    readline-6.2/history.c
    readline-6.2/histexpand.c
    readline-6.2/histfile.c
    readline-6.2/histsearch.c
    readline-6.2/patchlevel
    ./build.sh: line 41: patch: command not found
    
    ============ Building the readline extension module ============
    
    running install
    running build
    running build_ext
    building 'readline' extension
    creating build
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/Modules
    creating build/temp.linux-x86_64-2.7/Modules/2.x
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_RL_CALLBACK -DHAVE_RL_CATCH_SIGNAL -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_COMPLETION_SUPPRESS_APPEND -DHAVE_RL_PRE_INPUT_HOOK -I. -I/usr/local/include/python2.7 -c Modules/2.x/readline.c -o build/temp.linux-x86_64-2.7/Modules/2.x/readline.o -Wno-strict-prototypes
    creating build/lib.linux-x86_64-2.7
    gcc -pthread -shared build/temp.linux-x86_64-2.7/Modules/2.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.linux-x86_64-2.7/readline.so
    gcc: readline/libreadline.a: No such file or directory
    gcc: readline/libhistory.a: No such file or directory
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yaN9Fr/readline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-LArwHg-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yaN9Fr/readline/

 

然后

#yum -y install patch

安装了这个打补丁工具

再用

[root@localhost ~]# pip install readline
Collecting readline
  Using cached readline-6.2.4.1.tar.gz
Installing collected packages: readline
  Running setup.py install for readline ... done
Successfully installed readline-6.2.4.1

OK成功了。。。现在就可以放心的使用上下左右及回退键了。

© 著作权归作者所有

共有 人打赏支持
上一篇: 源码安装paramiko
下一篇: python 下载文件
东方封夜
粉丝 0
博文 9
码字总数 4503
作品 0
成都
系统管理员
私信 提问
python-MySQLdb接口程序安装

centos 7,python2.7 安装python-MySQLdb,因是最小化安装,安装过程中需要依赖其他的工具或包 [root@localhost ~]# pipinstall mysql-python 报错:Command "python setup.py egginfo" fai...

黑鹰战队
2017/06/16
0
0
window下python安装包问题小结

你可能遇到的问题包括: ImportError: No module named sklearn 未安装sklearn包 ImportError: DLL load failed: 找不到指定的模块 ImportError: DLL load failed: The specified module cou......

langb2014
2017/10/30
0
0
CentOS6.x 下python2.6升级到python2.7,easy_install的安装

因为CentOS 自带的python是2.6,要想使用python2.7,需要对其进行升级。 升级python2.6到2.7 更改yum的配置文件(因为升级到python2.7之后,原来的yum就无法使用了) 如果出现RuntimeError:...

ok绷forever
2016/12/05
28
0
win7 下安装scrapy遇的坑

一. 安装 由于scrapy进行网络抓取的便捷与强大功能,准备在win7下安装该框架,但遇到很多麻烦。 解决方法: 二. 使用 在初步使用scrapy框架时,也出现一些问题:scrapy startproject tutoria...

fight123
2016/11/12
16
0
win7下python2.7安装 pip,setuptools的正确方法(亲测)

windows7 下 0.先安装python2.7.5 32位:https://www.python.org/ftp/python/2.7.5/python-2.7.5.msi 64位:https://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi 1.下载htt......

丰_申
2016/02/01
99
0

没有更多内容

加载失败,请刷新页面

加载更多

矿难让显卡压了那么多货咋办?NV如是说

在苏州 GTC 开幕的几天前,英伟达刚刚遭遇了一次股价的腰斩。 近来加密货币的热度渐低,受到挖矿热潮照顾许多的英伟达「矿机」销量受到打击,甚至出现了严重的库存危机,加上近来刚刚发的 RT...

linux-tao
15分钟前
1
0
Python学习日记5|BeautifulSoup中find和find_all的用法

Python学习日记5|BeautifulSoup中find和find_all的用法 是蓝先生 关注 2016.04.20 11:26* 字数 930 阅读 37205评论 11喜欢 10 今天是4.20号。 前天晚上看到蒋方舟的一句话: 不要左顾右盼。慢...

linjin200
15分钟前
1
0
浅析Vue.js 中的条件渲染指令

1 应用于单个元素 Vue.js 中的条件渲染指令可以根据表达式的值,来决定在 DOM 中是渲染还是销毁元素或组件。 html: <div id="app"><p v-if="type===1">拌面</p><p v-else-if="type==...

开元中国2015
16分钟前
1
0
聊天机器人最难理解的 10 个词汇

简评:现在,越来越多的「聊天机器人」凭借着人工智能能与人类对话,甚至编写新闻。人们该如何判断对方是一个血肉之躯,还是一个可笑的算法?又该如何判断一个小说故事是由一台机器编写的,而...

极光推送
21分钟前
1
0
开源 java CMS - FreeCMS2.8会员我的评论

项目地址:http://www.freeteam.cn/ 我的评论 从左侧管理菜单点击我的评论进入。在这里可以查看当前登录会员的所有评论记录。 删除评论 选择评论然后点击删除按钮可以完成删除操作。 为了防止...

freeteam
45分钟前
1
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部