問題描述
當我嘗試在 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 錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!