OpenBSD 5.7-current上安装uwsgi

在OpenBSD环境下搭建各种服务器的相关讨论。

版主: lionuxchenjun天地乾坤

回复
头像
acheng
锌 Zn
帖子: 581
注册时间: 2011-07-07 21:52

OpenBSD 5.7-current上安装uwsgi

帖子 acheng » 2015-01-20 22:42

本来uwsgi可以通过“pip install uwsgi”来安装,但是在5.7-current (2015/01/20 snapshot)上却报错。
Cleaning up...
Command /usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/uwsgi/setup.py';ex
ec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --
record /tmp/pip-nHH8su-record/install-record.txt --single-version-externally-managed --compile failed with error
code 1 in /tmp/pip_build_root/uwsgi
Storing debug log for failure in /root/.pip/pip.log
最后只得下载源码自己编译,但是编译时会碰到同样的错误。

安装了py-dev包,重新尝试,错误依旧。

google一番,不得要领。在log中看到错误是跟一个名为KERN_PROC_PID的宏有关,而此宏是在sysctl.h中定义,于是,在报错的文件(core/logging.c,第7行)中加入:

代码: 全选

#include <sys/sysctl.h>
重新编译 (python uwsgiconfig.py --build)通过。

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 9 访客