在Ubuntu环境下安装uWsgi的时候出现了一些问题
1:安装时出现错误:
[x86_64-linux-gnu-gcc -pthread] plugins/python/python_plugin.o
In file included from plugins/python/python_plugin.c:1:0:
plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-fvq6260p/uwsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-gnwj6mya/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-fvq6260p/uwsgi/
解决方案:sudo apt-get install libpython3.6-dev
(我这里用的的是python3.6,你要替换成你自己的python年版本)
之后安装成功。感谢:https://blog.csdn.net/windblew/article/details/79613893
---------------------------------------------------------------------------------------------------------------------------------------------------
在Ubuntu环境下安装uWsgi的时候 还 出现了一些问题,在
https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html#installing-uwsgi-with-python-support
支持的方式中安装时,我用了下图的第二种 curl下载安装的方式。
但是uwsgi启动的时候还是会有问题。很可惜没有解决
错误情况为:
> >>>>>> uwsgi --http :8000 --wsgi-file test.py
> >>>>>> uwsgi: option '--http' is ambiguous; possibilities: '--http-socket'
> >>>>>> '--http-socket-modifier2' '--http-socket-modifier1'
> >>>>>> uwsgi --http-socket :8000 --wsgi-file test.py
> >>>>>> uwsgi: unrecognized option '--wsgi-file'
解决方案:http://lists.unbit.it/pipermail/uwsgi/2014-November/007725.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)