CentOS7安装uwsgi遇到的坑解决方法
2023-03-07 09:48:14 时间
安装uwsgi遇到报错,nstall –record /tmp/pip-dy632wim-record/install-record.txt –single-version-externally-managed –compile” failed with error code 1 in /tmp/pip-build-399zlqtw/uwsgi
错误原因:没有装 python-dev 注意: cnetos系统下,并不是交python-dev,而是叫python-devel 由于我的python版本是3.6.7的,所以我这里安装的是python36-devel
>: yum install python36-devel
>: yum install uwsgi
成功了
如果是其他系统的,也可以按照这个思路去找原因 若,不知道python版本,可以直接用命令:python –version查看 再通过 yum search python3 可以搜索出python3有关的包,搜索结果如图(只截了后半部分):
具体报错信息如下:
Failed to build uwsgi
Installing collected packages: uwsgi
Running setup.py install for uwsgi ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8v_0173e/uwsgi_d1211ccdf2da452ea5e479794821a3d4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8v_0173e/uwsgi_d1211ccdf2da452ea5e479794821a3d4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gmj1e6tx/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/uwsgi
cwd: /tmp/pip-install-8v_0173e/uwsgi_d1211ccdf2da452ea5e479794821a3d4/
Complete output (134 lines):
/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'descriptions'
warnings.warn(msg)
running install
using profile: buildconf/default.ini
detected include path: ['/usr/lib/gcc/x86_64-redhat-linux/8/include', '/usr/local/include', '/usr/include']
Patching "bin_name" to properly install_scripts dir
detected CPU cores: 8
configured CFLAGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -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_UUID -DUWSGI_VERSION="\"2.0.20\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="20" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -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 ***
core/utils.o is up to date
core/protocol.o is up to date
core/socket.o is up to date
core/logging.o is up to date
core/master.o is up to date
core/master_utils.o is up to date
core/emperor.o is up to date
core/notify.o is up to date
core/mule.o is up to date
core/subscription.o is up to date
core/stats.o is up to date
core/sendfile.o is up to date
core/async.o is up to date
core/master_checks.o is up to date
core/fifo.o is up to date
core/offload.o is up to date
core/io.o is up to date
core/static.o is up to date
core/websockets.o is up to date
core/spooler.o is up to date
core/snmp.o is up to date
core/exceptions.o is up to date
core/config.o is up to date
core/setup_utils.o is up to date
core/clock.o is up to date
core/init.o is up to date
core/buffer.o is up to date
core/reader.o is up to date
core/writer.o is up to date
core/alarm.o is up to date
core/cron.o is up to date
core/hooks.o is up to date
core/plugins.o is up to date
core/lock.o is up to date
core/cache.o is up to date
core/daemons.o is up to date
core/errors.o is up to date
core/hash.o is up to date
core/master_events.o is up to date
core/chunked.o is up to date
core/queue.o is up to date
core/event.o is up to date
core/signal.o is up to date
core/strings.o is up to date
core/progress.o is up to date
core/timebomb.o is up to date
core/ini.o is up to date
core/fsmon.o is up to date
core/mount.o is up to date
core/metrics.o is up to date
core/plugins_builder.o is up to date
core/sharedarea.o is up to date
core/rpc.o is up to date
core/gateway.o is up to date
core/loop.o is up to date
core/cookie.o is up to date
core/querystring.o is up to date
core/rb_timers.o is up to date
core/transformations.o is up to date
core/uwsgi.o is up to date
proto/base.o is up to date
proto/uwsgi.o is up to date
proto/http.o is up to date
proto/fastcgi.o is up to date
proto/scgi.o is up to date
proto/puwsgi.o is up to date
lib/linux_ns.o is up to date
core/zlib.o is up to date
core/regexp.o is up to date
core/routing.o is up to date
core/yaml.o is up to date
core/ssl.o is up to date
core/legion.o is up to date
core/xmlconf.o is up to date
[thread 2][gcc -pthread] core/dot_h.o
[thread 1][gcc -pthread] core/config_py.o
*** uWSGI compiling embedded plugins ***
[thread 6][gcc -pthread] plugins/python/python_plugin.o
[thread 5][gcc -pthread] plugins/python/pyutils.o
[thread 7][gcc -pthread] plugins/python/pyloader.o
[thread 4][gcc -pthread] plugins/python/wsgi_handlers.o
[thread 0][gcc -pthread] plugins/python/wsgi_headers.o
[thread 3][gcc -pthread] plugins/python/wsgi_subhandler.o
[thread 1][gcc -pthread] plugins/python/web3_subhandler.o
[thread 2][gcc -pthread] plugins/python/pump_subhandler.o
In file included from plugins/python/pyloader.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
In file included from plugins/python/python_plugin.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
In file included from plugins/python/pyutils.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
In file included from plugins/python/wsgi_subhandler.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
In file included from plugins/python/wsgi_handlers.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
In file included from plugins/python/wsgi_headers.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
In file included from plugins/python/web3_subhandler.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
In file included from plugins/python/pump_subhandler.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8v_0173e/uwsgi_d1211ccdf2da452ea5e479794821a3d4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8v_0173e/uwsgi_d1211ccdf2da452ea5e479794821a3d4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gmj1e6tx/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/uwsgi Check the logs for full command output.
未经允许不得转载:肥猫博客 » CentOS7安装uwsgi遇到的坑解决方法
相关文章
- 图像处理工具Python扩展库,你了解吗?
- 十个常用的损失函数解释以及Python代码实现
- 30 个数据科学工作中必备的 Python 包
- 如何在 Windows 上安装 Python
- 几行 Python 代码就可以提取数百个时间序列特征
- 使用Python快速搭建接口自动化测试脚本实战总结
- 哪种编程语言最适合开发网页抓取工具?
- 不要在 Python 中使用循环,这些方法其实更棒!
- 震惊!用Python探索《红楼梦》的人物关系!
- 如何最简单、通俗地理解Python模块?
- 酷炫,Python实现交通数据可视化!
- 为什么急于寻找Python的替代者?
- 30 个数据工程必备的Python 包
- 去字节面试被面这题能答上来吗?谈谈你对时间轮的理解?
- 火山引擎在行为分析场景下的 ClickHouse JOIN 优化
- 用Python爬取了某宝1166家月饼数据进行可视化分析,终于找到最好吃的月饼~
- 在 Linux 上试试这个基于 Python 的文件管理器
- Python列表解析式到底该怎么用?
- 如何快速把你的 Python 代码变为 API
- 十个Python初学者常犯的错误