当运行uwsgi时,我收到以下消息:
!!! no internal routing support, rebuild with pcre support !!!
Run Code Online (Sandbox Code Playgroud)
我已经使用以下命令安装了pcre(我认为):
Sudo apt-get install libpcre3 libpcre3-dev
Run Code Online (Sandbox Code Playgroud)
我的问题是:为什么即使在我安装了pcre软件包之后我仍然收到此消息,如果我需要重新安装uwsgi并激活pcre我该怎么做?
此外,内部路由是否重要?我认为它确实如此,否则uwsgi的制造商就不会提出这个消息.我运行Ubuntu 12.04 LTS
.
谢谢您的帮助!
小智 95
pip install uwsgi -I
Run Code Online (Sandbox Code Playgroud)
不会重新编译uwsgi二进制文件,它只是重新安装python egg.您需要使用pcre库重建uwsgi二进制文件.
sudo apt-get install libpcre3 libpcre3-dev
Run Code Online (Sandbox Code Playgroud)
我认为最简单的方法就是卸载uwsgi,然后再次运行pip安装程序.
pip uninstall uwsgi
sudo apt-get remove uwsgi
Run Code Online (Sandbox Code Playgroud)
然后
pip install uwsgi
Run Code Online (Sandbox Code Playgroud)
你应该看到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 #############
Run Code Online (Sandbox Code Playgroud)
现在注意pcre = true
ala*_*jds 61
pip install uwsgi -I --no-cache-dir
它重新安装(-I
),如@leech所说,但忽略编译的缓存(--no-cache-dir
)并使用新的lib重新编译事物.
小智 8
pip uninstall uwsgi
sudo apt-get install libpcre3 libpcre3-dev
pip install uwsgi
Run Code Online (Sandbox Code Playgroud)
我用上面的命令解决了它.
小智 5
完成@alanjds 的回答,以下是向已安装的 uWSGI 添加 pcre 支持的过程。
sudo apt-get install libpcre3 libpcre3-dev
pip install uwsgi -I --no-cache-dir
Run Code Online (Sandbox Code Playgroud)
您不需要卸载 uWSGI