2014-02-10 49 views
59

運行uwsgi我收到以下消息時:重建uwsgi與PCRE支持

!!! no internal routing support, rebuild with pcre support !!! 

我已經安裝PCRE(我認爲)用下面的命令:

Sudo apt-get install libpcre3 libpcre3-dev 

我的問題是:爲什麼我還受收到這個消息,我已經安裝了PCRE包,如果我需要重新安裝uwsgi並激活PCRE我怎麼做它甚至以後?

此外,沒有內部路由回事?我認爲它確實存在,否則uwsgi的製造者不會讓這個消息出現。我正在運行Ubuntu 12.04 LTS

感謝您的幫助!

回答

2

你嘗試:

pip install uwsgi -I 

-I標誌將迫使它重新安裝

+0

運行該命令和uwsgi重新安裝罰款。但是當我運行它時,我仍然收到有關使用PCRE支持重建的相同信息。 – johnmic07

+1

@ johnmic07 libpcre3-dev的是夠了,這是不可能的,你需要的路由 – jwalker

+0

如果你有一個的virtualenv設置(我希望你做的),您的系統可能會在本地uwsgi之間的混淆,全球uwsgi(當你用'須藤安裝pip'),也許系統(比如'apt-get')包。 我會在virtualenv中構建它,然後在構建輸出中查找'pcre = yes',然後在virtualenv'bin'目錄中找到該程序 – leech

86
pip install uwsgi -I 

不會重新編譯的二進制uwsgi,它只是重新安裝蟒蛇蛋。您需要使用pcre庫重建uwsgi二進制文件。

sudo apt-get install libpcre3 libpcre3-dev 

我認爲最簡單的方法就是卸載uwsgi,然後再次運行pip安裝程序。

pip uninstall uwsgi 
sudo apt-get remove uwsgi 

然後

pip install uwsgi 

你應該看到PIP運行setup.py腳本和一堆編譯器的消息。最後一條消息應該告訴你是這樣的:

################# uWSGI configuration ################# 

pcre = True 
kernel = Linux 
malloc = libc 
execinfo = False 
ifaddrs = True 
ssl = True 
zlib = True 
locking = pthread_mutex 
plugin_dir = . 
timer = timerfd 
yaml = embedded 
json = False 
filemonitor = inotify 
routing = True 
debug = False 
capabilities = False 
xml = libxml2 
event = epoll 

############## end of uWSGI configuration ############# 

通知如何PCRE =真現

+1

我跟着程序,我沒有從編譯器得到這個輸出。你知道我在哪裏可以找到在ubuntu下的配置?我找不到/ etc – chefarov

+2

我有同樣的問題,但在CentOS上。我安裝了'gcc *'和'pcre-devel'而不是'libpcre3'和'libpcre3-dev',UWSGI現在工作正常。 – axplusb

+0

您也可以使用'sudo/opt/storwizerest-venv/bin/pip install --force-reinstall -U --no-deps uwsgi'通過pip重新安裝。 '--force-reinstall'將會使'-U'重新安裝相同的版本(並且令人困惑的是,--force-reinstall'沒有'-U'什麼也不做),'--no-deps'將阻止嘗試更新所有依賴關係。 – Taywee

33

pip install uwsgi -I --no-cache-dir

它重新安裝(-I)作爲@leech說,但忽略了編譯緩存(--no-cache-dir)並用新的庫重新編譯。

+2

這是爲我工作的答案,而不是被接受的答案。 – Rick

+0

這也適用於我。這是我認爲只花幾分鐘就能解決的那些問題之一,但最終花費了數小時。 – trench

+0

一旦你完成'pip uninstall uwsgi'的工作,對我來說一切順利。謝謝! –

5
pip uninstall uwsgi 

sudo apt-get install libpcre3 libpcre3-dev 

pip install uwsgi 

我用上面的命令解決了它。

0

如果你都試過以上,但它仍然有同樣的錯誤,並與下面的,請檢查您的命令參數,特別是--http插座/path/to/your.sock。這是路徑='/路徑/到'必須存在

thunder lock: disabled (you can enable it with --thunder-lock) 
bind(): No such file or directory [core/socket.c line 230]