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

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

nginx 报错

upstream prematurely closed connection while reading response header from upstream

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

uwsgi -- unavailable modifier requested: 0

解决办法

yum search vim uwsgi-plugin-python

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

[[email protected] 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.

所以我

[[email protected] 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

原文地址:https://www.cnblogs.com/huchong/p/10031223.html

时间: 2024-11-12 12:11:42

uwsgi -- unavailable modifier requested: 0 -- 的解决办法的相关文章

error while loading shared libraries: libpcre.so.0的解决办法(转)

error while loading shared libraries: libpcre.so.0的解决办法 昨晚刚买了台linux云服务器,今天配置apache2时,因没有备份libpcre.so.0文件便执行命令“rpm -e pcre –nodeps”,导致丢失libpcre.so.0文件.结果可想而知,新版的pcre再也安装不上了,apache2也无法再编译了.只要一编译,就提示错误: error while loading shared libraries: libpcre.so.0

启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration! CPU acceleration status:HAXM must be updated(version 1.1.1<6.0.1) 解决办法

启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration!  CPU acceleration status:HAXM must be updated(version 1.1.1<6.0.1) 解决办法: 在android sdk 安装目录下找到 \Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager 双击int

NagiosQL 3.2无法重启Nagios4.0+的解决办法

由于最近将Nagios从3.X版本升级到了4.0.7,突然发现nagiosQL无法重启Naigos,查了很多资料都是没有能够解决,最后,终于在一个论坛中找到,只是不容易呀. 导致原因:因为nagiosql的重启消息格式还是3.x的,而4.x版本的nagios重启命令格式已经改变. 解决方法: 修改nagiosql的verify.php,使其$strCommandString = "[".mktime()."] RESTART_PROGRAM;".mktime();

Cannot assign requested address的解决办法

今天想试一下redis,写了个程序,对redis连续进行100000访问,却出现以了Cannot assign requested address的问题,我起先是以为是redis的问题(可能承受不了这么多访问量),可是redis被大家吹的那么NB,不会出现这么SB的问题吧,于 是google之,发现原来是: 客户端频繁的连服务器,由于每次连接都在很短的时间内结束,导致很多的TIME_WAIT,以至于用光了可用的端 口号,所以新的连接没办法绑定端口,即“Cannot assign requeste

eclipse 和 android studio 编译时报 Unsupported major.minor version 52.0错解决办法

version 52.0 是java8的环境.当gradle tools 升级到2.2.1时候,可能编译时候会报该错误. 很多网友说更改java version,但是很多时候无效.下面是我遇到时候的解决办法: 解决思路如下: 1.Android studio 中: 出现该问题的情况,大多数是在升级完 gradle tools 2.2.1,把android studio升级到最新2.2版本时候遇到的. 原因是,没有同步更新Android SDK Build-tools.把SDK的build-too

VS2013 此模板尝试加载组件程序集”NuGet.VisualStudio.interop,Version=1.0.0.0 的解决办法 ZT

情景再现 使用VS2013新建ASP.NET MVC项目时,出现下面的错误: 具体错误信息: 错误: 此模板尝试加载组件程序集 “NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.有关此问题和如何启用此模板的详细信息,请参见有关“自定义项目模板”的文档. 分析错误 既然错误信息提示模板尝试加载组件程序集,那说明NuGet.VisualStudio.Inter

当display=none时,元素和子元素高度为0的解决办法

在前端中为了某种需要,我们需要获取display=none的元素或者子元素的实际高度来进行某些处理,然而html对display=none的元素和子元素是不进行渲染的,如果我们没有规定这些元素的高度那么它们的高度都会是0,就算元素中有文字或者其它内容. 解决办法:通过jquery的show方法先展示出来,再在回调函数中获取它们的高度并操作即可,代码如下:$(".box").show(0,function(){ var h = $(".box").outerHeigh

ie6下div高度不能为0的解决办法

需要实现一个效果:点击关闭按钮时,div动态隐藏. jquery源码: 这个方法在谷歌 火狐及ie7以上都可以实现效果,但ie6下始终保持一个高度. 原因:ie始终默认div的最小高度为12px,即使你设置为0,但它依然默认一个字体的高度12px 解决办法:给当前需设置高度低于12px的div增加一个overflow:hidden属性.

Chrome浏览器42版本以上不支持silverlight 5.0的解决办法

场景: 浏览器:chrome V43 插件:silverlight 5.0 操作系统:xp 问题: 自己开发silverlight网站在IE7和firefox中能正常打开,但在chrome中打开失败. 原因: chrome 从42版本开始不支持NPAPI,(Chrome 42禁用NPAPI和相关插件:Java.Unity和Silverlight) 解决办法: 1.在Chrome浏览器地址栏中输入:chrome://flags/ 2.在打开的浏览器配置页面中找到"启用 NPAPI Mac, Win