用pcre支持重建uwsgi

问题描述 投票:64回答:6

当运行uwsgi时,我收到以下消息:

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

我已经使用以下命令安装了pcre(我认为):

Sudo apt-get install libpcre3 libpcre3-dev

我的问题是:为什么即使在我安装了pcre软件包之后我仍然收到此消息,如果我需要重新安装uwsgi并激活pcre我该怎么做?

此外,内部路由是否重要?我认为它确实如此,否则uwsgi的制造商就不会提出这个消息。我正在运行Ubuntu 12.04 LTS

谢谢您的帮助!

pcre uwsgi
6个回答
93
投票
pip install uwsgi -I

不会重新编译uwsgi二进制文件,它只是重新安装python egg。您需要使用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 = true


59
投票

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

它重新安装(-I)@leech说,但忽略编译缓存(--no-cache-dir)并重新编译新的libs。


8
投票
pip uninstall uwsgi

sudo apt-get install libpcre3 libpcre3-dev

pip install uwsgi

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


4
投票

你试过了吗:

pip install uwsgi -I 

-I旗帜将迫使它重新安装


0
投票

如果你已经尝试了以上所有但是它仍然有相同的错误和下面的错误,请检查你的命令参数,特别是--http-socket /path/to/your.sock。那就是path ='/ path / to'必须存在

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

0
投票

完成@alanjds答案,以下是为已安装的uWSGI添加pcre支持的过程。

sudo apt-get install libpcre3 libpcre3-dev
pip install uwsgi -I --no-cache-dir

您无需卸载uWSGI

© www.soinside.com 2019 - 2024. All rights reserved.