ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

ubuntu16安装uwsgi

2022-05-17 19:31:16  阅读:198  来源: 互联网

标签:use -- root running ubuntu16 安装 uwsgi


先说解决办法:1、python的版本用3.8;2、gcc降级,教程如:https://blog.csdn.net/haojie_duan/article/details/124143322,https://blog.csdn.net/feinifi/article/details/121793945;3、用pip安装uwsgi,别用apt安装。

 

我的环境是python3.9,首先用pip install uwsgi安装时提示报错,安装不上,后面用apt install uwsgi 安装成功了,此时uwsgi的版本是2.0.20 debain。然后我用uwsgi --ini xxx.ini启动时报错,具体报错如下:

*** Starting uWSGI 2.0.15-debian (64bit) on [Tue May 17 16:13:01 2022] ***
compiled with version: 7.5.0 on 26 August 2021 18:40:50
os: Linux-4.15.0-118-generic #119-Ubuntu SMP Tue Sep 8 12:30:01 UTC 2020
nodename: VM-7-5-ubuntu
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/code/Manage_Api/quanwang_jira2596
writing pidfile to /home/code/Manage_Api/quanwang_jira2596/jira2596_server.pid
detected binary path: /usr/bin/uwsgi-core
dropping root privileges as early as possible
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /home/code/Manage_Api/quanwang_jira2596
your processes number limit is 63260
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)
dropping root privileges after socket binding
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
dropping root privileges after plugin initialization
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
The -s/--socket option is missing and stdin is not a socket.

我查阅了N多的资料,还是解决不了问题;这个时候我就在想是不是uwsgi的版本有问题,应该用pip安装的uwsgi,而不是apt安装的。

然后我再次用pip安装,安装报错,崩溃ing.......

然后我孤注一掷了,决定用pip安装,如果再不成功就放弃在ubuntu上面跑,换centos7。

用pip安装时报错,上网一查,发现是gcc版本太高了,又看了一下centos7里面的gcc版本,果然是ubuntu的gcc版本高,然后就降gcc版本,教程:https://blog.csdn.net/haojie_duan/article/details/124143322,https://blog.csdn.net/feinifi/article/details/121793945,成功降完了还是不行,更加崩溃ing。

然后又发现ubuntu中python版本是3.9,自我感觉问题应该不是python版本,但是也没其它方法了。孤注一掷吧,用conda创建了一个3.8.3(与centos7保持一致)。然后运行了一下,发现好了,真特么是奇迹啊,一步一坑,坑坑都得填..........

标签:use,--,root,running,ubuntu16,安装,uwsgi
来源: https://www.cnblogs.com/qiaoer1993/p/16282109.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有