侧边栏壁纸
博主头像
学海无涯博主等级

有疑问可发邮件[email protected]

  • 累计撰写 326 篇文章
  • 累计创建 85 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

uwsgi: unrecognized option '--module'

利刃
2018-01-21 / 0 评论 / 0 点赞 / 13 阅读 / 6284 字
温馨提示:
本文最后更新于 2024-08-13,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

问题:

[root@site one]# uwsgi --module one.wsgi --http :80
uwsgi: unrecognized option '--module'
getopt_long() error

解决方法:

遇到此问题是因为同时使用pip instal 及yum install 安装了两个uwsgi软件包,此次问题是通过将yum install安装的uwsgi软件包卸载之后恢复正常。

[root@site one]# yum -y install uwsgi
已加载插件:fastestmirror
设置安装进程
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.tuna.tsinghua.edu.cn
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.tuna.tsinghua.edu.cn
 * updates: mirrors.tuna.tsinghua.edu.cn
解决依赖关系
--> 执行事务检查
---> Package uwsgi.x86_64 0:2.0.15-1.el6 will be 安装
--> 完成依赖关系计算
依赖关系解决
======================================================================================================
 软件包                架构                   版本                         仓库                  大小
======================================================================================================
正在安装:
 uwsgi                 x86_64                 2.0.15-1.el6                 epel                 353 k

事务概要
======================================================================================================
Install       1 Package(s)
总下载量:353 k
Installed size: 832 k
下载软件包:
uwsgi-2.0.15-1.el6.x86_64.rpm                                                  | 353 kB     00:01     
运行 rpm_check_debug 
执行事务测试
事务测试成功
执行事务
  正在安装   : uwsgi-2.0.15-1.el6.x86_64                                                          1/1 
Executing System V post-install tasks
  Verifying  : uwsgi-2.0.15-1.el6.x86_64                                                          1/1 
已安装:
  uwsgi.x86_64 0:2.0.15-1.el6                                                                         
完毕!
[root@site one]# uwsgi --module one.wsgi --http :80
uwsgi: unrecognized option '--module'
getopt_long() error
[root@site one]# yum -y remove uwsgi
已加载插件:fastestmirror
设置移除进程
解决依赖关系
--> 执行事务检查
---> Package uwsgi.x86_64 0:2.0.15-1.el6 will be 删除
--> 完成依赖关系计算
依赖关系解决
======================================================================================================
 软件包               架构                  版本                           仓库                  大小
======================================================================================================
正在删除:
 uwsgi                x86_64                2.0.15-1.el6                   @epel                832 k

事务概要
======================================================================================================
Remove        1 Package(s)
Installed size: 832 k
下载软件包:
运行 rpm_check_debug 
执行事务测试
事务测试成功
执行事务
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Executing System V pre-uninstall tasks
  正在删除   : uwsgi-2.0.15-1.el6.x86_64                                                          1/1 
Executing System V post-uninstall tasks
  Verifying  : uwsgi-2.0.15-1.el6.x86_64                                                          1/1 
删除:
  uwsgi.x86_64 0:2.0.15-1.el6                                                                         
完毕!
[root@site one]# export PATH
[root@site one]# uwsgi --module one.wsgi --http :80
*** Starting uWSGI 2.0.15 (64bit) on [Sun Jan 21 04:08:32 2018] ***
compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-18) on 21 January 2018 02:36:20
os: Linux-2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017
nodename: site.wlzs.cn
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /www/one
detected binary path: /usr/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 3812
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :80 fd 4
spawned uWSGI http 1 (pid: 6581)
uwsgi socket 0 bound to TCP address 127.0.0.1:43837 (port auto-assigned) fd 3
Python version: 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)  [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x8a05e0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72760 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x8a05e0 pid: 6580 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 6580, cores: 1)
[pid: 6580|app: 0|req: 1/1] 192.168.129.1 () {36 vars in 616 bytes} [Sun Jan 21 04:08:47 2018] GET /index => generated 81 bytes in 47 msecs (HTTP/1.1 200) 1 headers in 59 bytes (1 switches on core 0)

测试正常:

image

二〇一八年一月二十一日 17:27:19

0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区