问题描述
当我尝试在 CentOS 服务器中为我新安装的 python2.7 安装 readline 模块时,谁能帮我解决 gcc 的问题?
Could anyone kindly help me out what's wrong with the gcc when I am trying to install readline module for my newly installed python2.7 in the CentOS server?
<代码> GCC -pthread -fno严格走样-g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict的原型-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/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-prototypesgcc -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.所以gcc: readline/libreadline.a: 没有这样的文件或目录gcc:readline/libhistory.a:没有这样的文件或目录错误:命令gcc"失败,退出状态为 1
非常感谢!
推荐答案
readline 与 Python 模块捆绑在一起,它会尝试为您构建它,但如果您的系统无法完成构建,您将看到此错误显示.就我而言,系统中缺少 patch
.yum install patch
帮我解决了.
readline is bundled with the Python module and it attempts to build it for you, but you'll see this error display if your system was unable to complete the build. In my case, patch
was missing from the system. yum install patch
solved it for me.
这篇关于当我尝试安装 readline-6.2 时出现 gcc 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!