ubuntu16 新机部署django时安装uwsgi出错

lemonMagister 2017-08-31 10:07:45
乌班图新手,因为要把django部署到nginx上,所以搞到了一台新机。
我以为乌班图没有自带python,也没去查。就直接开始了apt的update。
我先安装了apt-get install pyhton2.7 python2.7-dev
之后安装了nginx和django
但是在安装uwsgi的时候出现了错误,报错如下:
Downloading/unpacking uwsgi
Downloading uwsgi-2.0.15.tar.gz (795kB): 795kB downloaded
Running setup.py (path:/tmp/pip_build_root/uwsgi/setup.py) egg_info for package uwsgi
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions'
warnings.warn(msg)
Installing collected packages: uwsgi
Running setup.py install for uwsgi
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions'
warnings.warn(msg)
In file included from core/protocol.c:1:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
In file included from core/utils.c:1:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
In file included from core/master.c:1:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
In file included from core/logging.c:2:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
In file included from core/socket.c:1:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
In file included from core/emperor.c:6:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
In file included from core/notify.c:1:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
In file included from core/master_utils.c:1:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-CodLS8-record/install-record.txt --single-version-externally-managed --compile:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions'

warnings.warn(msg)

running install

In file included from core/protocol.c:1:0:

./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

^

compilation terminated.

In file included from core/utils.c:1:0:

./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

^

compilation terminated.

In file included from core/master.c:1:0:

./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

^

compilation terminated.

In file included from core/logging.c:2:0:

./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

^

compilation terminated.

In file included from core/socket.c:1:0:

./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

^

compilation terminated.

In file included from core/emperor.c:6:0:

./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

^

compilation terminated.

In file included from core/notify.c:1:0:

./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

^

compilation terminated.

In file included from core/master_utils.c:1:0:

./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

^

compilation terminated.

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-CodLS8-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/uwsgi
...全文
214 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

23,124

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧