Flask接口签名sign原理与实例代码浅析
537
2022-11-06
安装 uwsgi报错解决
背景:
安装 uwsgi时报错如下,查阅相关资料说是 python-devel的问题,于是安装之后python-devel后问题解决
报错如下:
1 (venv) [xxxxxxx]# pip install uwsgi 2 DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at 3 Looking in indexes: 4 Collecting uwsgi 5 Downloading (801kB) 6 |????????????????????????????????| 808kB 3.1MB/s 7 Building wheels for collected packages: uwsgi 8 Building wheel for uwsgi (setup.py) ... error 9 ERROR: Command errored out with exit status 1: 10 command: /xxxxxx/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dy5kN5/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dy5kN5/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-BZc6P_ --python-tag cp27 11 cwd: /tmp/pip-install-dy5kN5/uwsgi/ 12 Complete output (98 lines): 13 /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions' 14 warnings.warn(msg) 15 running bdist_wheel 16 running build 17 running build_py 18 creating build 19 creating build/lib 20 copying uwsgidecorators.py -> build/lib 21 installing to build/bdist.linux-x86_64/wheel 22 running install 23 using profile: buildconf/default.ini 24 detected include path: ['/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include', '/usr/local/include', '/usr/include'] 25 Patching "bin_name" to properly install_scripts dir 26 detected CPU cores: 1 27 configured CFLAGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -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(-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(28 *** uWSGI compiling server core *** 29 [gcc -pthread] core/utils.o 30 [gcc -pthread] core/protocol.o 31 [gcc -pthread] core/socket.o 32 [gcc -pthread] core/logging.o 33 [gcc -pthread] core/master.o 34 [gcc -pthread] core/master_utils.o 35 [gcc -pthread] core/emperor.o 36 [gcc -pthread] core/notify.o 37 [gcc -pthread] core/mule.o 38 [gcc -pthread] core/subscription.o 39 [gcc -pthread] core/stats.o 40 [gcc -pthread] core/sendfile.o 41 [gcc -pthread] core/async.o 42 [gcc -pthread] core/master_checks.o 43 [gcc -pthread] core/fifo.o 44 [gcc -pthread] core/offload.o 45 [gcc -pthread] core/io.o 46 [gcc -pthread] core/static.o 47 [gcc -pthread] core/websockets.o 48 [gcc -pthread] core/spooler.o 49 [gcc -pthread] core/snmp.o 50 [gcc -pthread] core/exceptions.o 51 [gcc -pthread] core/config.o 52 [gcc -pthread] core/setup_utils.o 53 [gcc -pthread] core/clock.o 54 [gcc -pthread] core/init.o 55 [gcc -pthread] core/buffer.o 56 [gcc -pthread] core/reader.o 57 [gcc -pthread] core/writer.o 58 [gcc -pthread] core/alarm.o 59 [gcc -pthread] core/cron.o 60 [gcc -pthread] core/hooks.o 61 [gcc -pthread] core/plugins.o 62 [gcc -pthread] core/lock.o 63 [gcc -pthread] core/cache.o 64 [gcc -pthread] core/daemons.o 65 [gcc -pthread] core/errors.o 66 [gcc -pthread] core/hash.o 67 [gcc -pthread] core/master_events.o 68 [gcc -pthread] core/chunked.o 69 [gcc -pthread] core/queue.o 70 [gcc -pthread] core/event.o 71 [gcc -pthread] core/signal.o 72 [gcc -pthread] core/strings.o 73 [gcc -pthread] core/progress.o 74 [gcc -pthread] core/timebomb.o 75 [gcc -pthread] core/ini.o 76 [gcc -pthread] core/fsmon.o 77 [gcc -pthread] core/mount.o 78 [gcc -pthread] core/metrics.o 79 [gcc -pthread] core/plugins_builder.o 80 [gcc -pthread] core/sharedarea.o 81 [gcc -pthread] core/rpc.o 82 [gcc -pthread] core/gateway.o 83 [gcc -pthread] core/loop.o 84 [gcc -pthread] core/cookie.o 85 [gcc -pthread] core/querystring.o 86 [gcc -pthread] core/rb_timers.o 87 [gcc -pthread] core/transformations.o 88 [gcc -pthread] core/uwsgi.o 89 [gcc -pthread] proto/base.o 90 [gcc -pthread] proto/uwsgi.o 91 [gcc -pthread] proto/92 [gcc -pthread] proto/fastcgi.o 93 [gcc -pthread] proto/scgi.o 94 [gcc -pthread] proto/puwsgi.o 95 [gcc -pthread] lib/linux_ns.o 96 [gcc -pthread] core/zlib.o 97 [gcc -pthread] core/regexp.o 98 [gcc -pthread] core/routing.o 99 [gcc -pthread] core/yaml.o100 [gcc -pthread] core/ssl.o101 [gcc -pthread] core/legion.o102 [gcc -pthread] core/dot_h.o103 [gcc -pthread] core/config_py.o104 *** uWSGI compiling embedded plugins ***105 [gcc -pthread] plugins/python/python_plugin.o106 In file included from plugins/python/python_plugin.c:1:0:107 plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory108 #include
View Code
解决:
安装 python-devel
yum install python-devel
安装完成后再安装 uwsgi,成功安装
pip install uwsgi
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~