使用 pcre 支持重建 uwsgi [英] Rebuild uwsgi with pcre support

查看:55
本文介绍了使用 pcre 支持重建 uwsgi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When running uwsgi I got the following message:

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

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

I already have installed pcre (I think) with the following command:

sudo apt-get install libpcre3 libpcre3-dev

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

Why am I still getting this message even after I have installed the pcre package, if I need to reinstall uwsgi and activate pcre, how do I do it?

此外,内部路由重要吗?

Also, does internal routing matter?

我认为是这样,否则 uwsgi 的制作者不会让这个消息出现.我正在运行 Ubuntu 12.04 LTS.

I assume it does or else the makers of uwsgi wouldn't have made the message come up. I am running Ubuntu 12.04 LTS.

推荐答案

pip install uwsgi -I

不会重新编译 uwsgi 二进制文件,它只会重新安装 python egg.您需要使用 pcre 库重建 uwsgi 二进制文件.

Won't recompile the uwsgi binary, it just reinstalls the python egg. You need to rebuild the uwsgi binary with the pcre libraries.

sudo apt-get install libpcre3 libpcre3-dev

我认为最简单的方法就是卸载 uwsgi,然后再次运行 pip 安装程序.

I think the easiest way is just to uninstall uwsgi and then run the pip installer again.

pip uninstall uwsgi
sudo apt-get remove uwsgi

然后

pip install uwsgi

您应该会看到 pip 运行 setup.py 脚本和一堆编译器消息.最后一条消息应显示如下内容:

you should see pip run the setup.py script and a bunch of compiler messages. The last message should show you something like this:

################# 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 的方式

notice how pcre = true now

这篇关于使用 pcre 支持重建 uwsgi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆