[英]uwsgi http is ambiguous
Im trying to run Django application on uwsgi but get the below error. 我试图在uwsgi上运行Django应用程序,但出现以下错误。
uwsgi --http :8000 --home /home/cuser/.virtualenvs/vq --chdir /var/www/sid/sid -w wsgi.py
uwsgi: option '--http' is ambiguous
getopt_long() error
When I change from -http to --socket it works but again it says --home is ambiguous 当我从-http更改为--socket时,它可以工作,但再次说--home是不明确的
This is most likely because you have uwsgi installed from your distributions packaged binaries, which are more minimal in their build and lack some of the plugins. 这很可能是因为您从发行版打包的二进制文件中安装了uwsgi,二进制文件的构建更小,并且缺少某些插件。
You can fix this by either pip install uwsgi
and replace uwsgi
with path/to/uwsgi/binary/installed/using/pip
. 您可以通过修复这个
pip install uwsgi
和替换uwsgi
与path/to/uwsgi/binary/installed/using/pip
。 You can find that using pip show uwsgi
. 您可以使用
pip show uwsgi
找到它。
[Please note: use pip3
if you're using python3
] [请注意:如果您使用的是
python3
请使用pip3
]
Another method would be to download the respective http/python3 plugins and running the following command: 另一种方法是下载相应的http / python3插件并运行以下命令:
uwsgi --plugins http,python --http :8000 --home /home/cuser/.virtualenvs/vq --chdir /var/www/sid/sid -w wsgi.py
You may want to take into account when using this with distro-supplied packages, is that very probably your distribution has built uWSGI in modular way (every feature is a different plugin that must be loaded). 当与发行版本的软件包一起使用时,您可能要考虑到这一点,很可能是您的发行版以模块化方式构建了uWSGI(每个功能都是必须加载的不同插件)。
You have to prepend --plugin python,http to the command, and --plugin python when the HTTP router is removed 在删除HTTP路由器时,必须在命令前加上--plugin python,http和--plugin python
Example Appended --plugin python 附加示例-python插件
uwsgi --http :8000 --plugin python --home /home/cuser/.virtualenvs/vq --chdir /var/www/sid/sid -w wsgi.py
try: 尝试:
uwsgi --http=:8000 --home=/home/cuser/.virtualenvs/vq --chdir=/var/www/sid/sid -w wsgi.py
For some versions of getopt this should work. 对于某些版本的getopt,这应该可以工作。 If not, try to put your parameters in config file or update getopt library in your system and recompile uWSGI.
如果不是,请尝试将参数放入配置文件或更新系统中的getopt库,然后重新编译uWSGI。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.