前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >uwsgi -- unavailable modifier requested: 0 -- 的解决办法

uwsgi -- unavailable modifier requested: 0 -- 的解决办法

作者头像
用户1214487
发布2018-12-19 16:53:27
2K0
发布2018-12-19 16:53:27
举报
文章被收录于专栏:PythonPython

出现问题的环境: Centos7,nginx和uwsgi都是用yum安装的

nginx 报错

代码语言:javascript
复制
upstream prematurely closed connection while reading response header from upstream

说明是上游服务器出现了问题 所以是uwsgi出现问题 uwsgi 报错

代码语言:javascript
复制
uwsgi -- unavailable modifier requested: 0

解决办法

代码语言:javascript
复制
yum search vim uwsgi-plugin-python

找到对应版本的uwsgi-plugin-python,yum install一下 然后在ini文件中添加plugins = python,或者命令行添加–plugin python 比如我的python是python3.6.4

代码语言:javascript
复制
[root@localhost conf.d]# yum search vim uwsgi-plugin-python
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
=============================== N/S matched: vim ===============================
beakerlib-vim-syntax.noarch : Files for syntax highlighting BeakerLib tests in
                            : VIM editor
fluxbox-vim-syntax.noarch : Fluxbox syntax scripts for vim
neovim.x86_64 : Vim-fork focused on extensibility and agility
protobuf-vim.x86_64 : Vim syntax highlighting for Google Protocol Buffers
                    : descriptions
python2-neovim.noarch : Python client to Neovim
python34-neovim.noarch : Python client to Neovim
vim-X11.x86_64 : The VIM version of the vi editor for the X Window System
vim-common.x86_64 : The common files needed by any version of the VIM editor
vim-enhanced.x86_64 : A version of the VIM editor which includes recent
                    : enhancements
vim-filesystem.x86_64 : VIM filesystem layout
vim-go.x86_64 : Go development plugin for Vim
vim-gtk-syntax.noarch : Vim syntax highlighting for GLib, Gtk+, Gstreamer, and
                      : more
vim-jellybeans.noarch : A colorful, dark color scheme for Vim
vim-minimal.x86_64 : A minimal version of the VIM editor
vim-toml.noarch : Vim syntax for TOML
vim-vimoutliner.noarch : Script for building an outline editor on top of Vim
xtuple-csvimp-devel.x86_64 : CSVImp development files
apvlv.x86_64 : PDF viewer which behaves like Vim
vim-fugitive.noarch : A Git wrapper so awesome, it should be illegal
vim-halibut.noarch : Syntax file for the halibut manual tool
xtuple-csvimp.x86_64 : xTuple data import utility

======================= N/S matched: uwsgi-plugin-python =======================
uwsgi-plugin-python2.x86_64 : uWSGI - Plugin for Python 2 support
uwsgi-plugin-python2-gevent.x86_64 : uWSGI - Plugin for Python 2 GEvent support
uwsgi-plugin-python2-tornado.x86_64 : uWSGI - Plugin for Tornado (Python 2)
                                    : support
uwsgi-plugin-python34.x86_64 : uWSGI - Plugin for Python 3.4 support
uwsgi-plugin-python34-gevent.x86_64 : uWSGI - Plugin for Python 3.4 GEvent
                                    : support
uwsgi-plugin-python34-tornado.x86_64 : uWSGI - Plugin for Tornado (Python 3.4)
                                     : support
uwsgi-plugin-python36.x86_64 : uWSGI - Plugin for Python 3.6 support
uwsgi-plugin-python36-gevent.x86_64 : uWSGI - Plugin for Python 3.6 GEvent
                                    : support

  Name and summary matches mostly, use "search all" for everything.

所以我

代码语言:javascript
复制
[root@localhost conf.d]# yum install uwsgi-plugin-python36
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package uwsgi-plugin-python36.x86_64 0:2.0.17.1-1.el7 will be installed
--> Processing Dependency: uwsgi-plugin-common = 2.0.17.1-1.el7 for package: uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64
--> Processing Dependency: python36 for package: uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64
--> Running transaction check
---> Package python36.x86_64 0:3.6.6-1.el7 will be installed
---> Package python36-libs.x86_64 0:3.6.6-1.el7 will be installed
---> Package uwsgi-plugin-common.x86_64 0:2.0.17.1-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                     Arch         Version              Repository  Size
================================================================================
Installing:
 uwsgi-plugin-python36       x86_64       2.0.17.1-1.el7       epel        80 k
Installing for dependencies:
 python36                    x86_64       3.6.6-1.el7          epel        66 k
 python36-libs               x86_64       3.6.6-1.el7          epel       8.6 M
 uwsgi-plugin-common         x86_64       2.0.17.1-1.el7       epel        53 k

Transaction Summary
================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 8.8 M
Installed size: 37 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): python36-3.6.6-1.el7.x86_64.rpm                     |  66 kB   00:02     
(2/4): python36-libs-3.6.6-1.el7.x86_64.rpm                | 8.6 MB   00:00     
(3/4): uwsgi-plugin-common-2.0.17.1-1.el7.x86_64.rpm       |  53 kB   00:00     
(4/4): uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64.rpm     |  80 kB   00:00     
--------------------------------------------------------------------------------
Total                                              2.3 MB/s | 8.8 MB  00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python36-3.6.6-1.el7.x86_64                                  1/4 
  Installing : python36-libs-3.6.6-1.el7.x86_64                             2/4 
  Installing : uwsgi-plugin-common-2.0.17.1-1.el7.x86_64                    3/4 
  Installing : uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64                  4/4 
  Verifying  : uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64                  1/4 
  Verifying  : python36-libs-3.6.6-1.el7.x86_64                             2/4 
  Verifying  : python36-3.6.6-1.el7.x86_64                                  3/4 
  Verifying  : uwsgi-plugin-common-2.0.17.1-1.el7.x86_64                    4/4 

Installed:
  uwsgi-plugin-python36.x86_64 0:2.0.17.1-1.el7                                 

Dependency Installed:
  python36.x86_64 0:3.6.6-1.el7                                                 
  python36-libs.x86_64 0:3.6.6-1.el7                                            
  uwsgi-plugin-common.x86_64 0:2.0.17.1-1.el7                                   

Complete!

安装完成后,需要去ini文件中设置plugins = python36

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018-11-28 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档