2016-01-17 23 views
0

Running setup.py bdist_wheel for gnureadline如何在Jenkins上修復ShiningPanda virtualenv錯誤與gnureadline?

錯誤:

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/include/python2.7 -c Modules/2.x/readline.c -o build/temp.linux-x86_64-2.7/Modules/2.x/readline.o 
    In file included from Modules/2.x/readline.c:31:0: 
    ./readline/readline.h:385:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro 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/gnureadline.so 
    /usr/bin/ld: cannot find -lncurses 
    collect2: error: ld returned 1 exit status 
    error: command 'gcc' failed with exit status 1 

Mange Jenkins設置:

Python : CPython-2.7 
Path: /usr/bin/python 

回答

1

問題是gnureadline在我requirements.txt和構建虛擬環境和安裝要求時,它無法安裝軟件包。

gnureadline在大多數操作系統中不是必需的。作爲Ludwig在這個post指出:

gnureadline [is only needed] on platforms that don't provide readline at all, or that substitute readline for an incompatible product like libedit (i.e. Mac OS X)

因此,解決辦法是簡單地從requirements.txt

刪除 gnureadline