问题:
1 2 3 |
[root@site one]# uwsgi --module one.wsgi --http :80 uwsgi: unrecognized option '--module' getopt_long() error |
解决方法:
遇到此问题是因为同时使用pip instal 及yum install 安装了两个uwsgi软件包,此次问题是通过将yum install安装的uwsgi软件包卸载之后恢复正常。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
[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) |
测试正常:
二〇一八年一月二十一日 17:27:19