linux安装uwsgi出错

linux安装uwsgi出错

服务器:百度云服务器centos6.5
python版本:3.7
以排查:所有百度能查到的办法都已经用了,升级openssl到1.1,添加python-dev,加sudo等等。
安装命令:pip3 install uwsgi
报错信息:
Collecting uwsgi
Using cached https://files.pythonhosted.or...
Installing collected packages: uwsgi
Running setup.py install for uwsgi ... error

ERROR: Command errored out with exit status 1:

command: /usr/local/python3/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gxqm849m/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gxqm849m/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-sbdspo2r/install-record.txt --single-version-externally-managed --compile

cwd: /tmp/pip-install-gxqm849m/uwsgi/

Complete output (173 lines):

/usr/local/python3/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'descriptions'

warnings.warn(msg)

running install

using profile: buildconf/default.ini

detected include path: ['/usr/local/include', '/usr/lib/gcc/i686-redhat-linux/4.4.7/include', '/usr/include']

Patching "bin_name" to properly install_scripts dir

detected CPU cores: 1

configured CFLAGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-format -Wno-format-security -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_VERSION="\"2.0.18\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="18" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"

*** uWSGI compiling server core ***

省略。。。。

*** uWSGI linking ***

省略。。。。

collect2: ld returned 1 exit status

*** error linking uWSGI ***

ERROR: Command errored out with exit status 1:

/usr/local/python3/bin/python3.7 -u -c 'import sys, setuptools,

tokenize; sys.argv[0] = '"'"'/tmp/pip-install-

gxqm849m/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-

gxqm849m/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)

(__file__);code=f.read().replace('"'"'\r\n'"'"',

'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'

install --record /tmp/pip-record-sbdspo2r/install-record.txt --single-

version-externally-managed --compile Check the logs for full command

output.

问题描述

问题出现的平台版本及自己尝试过哪些方法

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)

你期待的结果是什么?实际看到的错误信息又是什么?


回答:

测试环境使用conda,线上环境更新centos版本到7.5


回答:

github上有人遇到了同样的问题。他的解决方案是用conda装。
你先装一个anaconda 然后再试下,下面的命令:

conda config --add channels conda-forge

conda install uwsgi

讨论来源:
https://github.com/unbit/uwsgi/issues/1516

以上是 linux安装uwsgi出错 的全部内容, 来源链接: utcz.com/a/162201.html

回到顶部