python - 在用uwsgi部署Django应用时报错
天蓬老师
天蓬老师 2017-04-17 15:01:42
0
1
942

配置文件如下:
[uwsgi]
http-socket = 0.0.0.0:8080
chdir = /root/yigo_runtime/app
virtualenv = /root/yigo_runtime/python
env = DJANGO_SETTINGS_MODULE=yigo_runtime.settings
static-map = /static=/root/yigo_runtime/app/static
module = django.core.handlers.wsgi:WSGIHandler()
processes = 4
threads = 2
stats = 0.0.0.0:9090

根据第一个错误提示:我卸载uwsgi后用sudo CC=gcc pip install uwsgi 命令重装了,再次运行uwsgi prod.ini 命令,还是报同样的错误,请问这是为什么呢?

由于prod.ini文件中配置了virtualenv,所以我在安装了virtualenv后,第二第三个问题消失了,但是第一个问题,!!! no internal routing support, rebuild with pcre support !!! 这条提示还是存在的,请问哪里出问题了呢?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
PHPzhong

"rebuild with pcre support" allows you to compile a version with pcre support. When you use pip, you just recompile, but you don't specify that pcre support must be compiled. It's likely that you don't have the pcre development libraries on your system (the distribution is unknown; you'll need a package with a name like libpcre-dev or libpcre-devel).

PS: Using root to run web programs is extremely dangerous.

PPS: It is also unsafe to compile software with root privileges.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template