错误原因:没有装 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有关的包,搜索结果如图(只截了后半部分):

具体报错信息如下:

  Building wheel for uwsgi (setup.py) ... errorERROR: Command errored out with exit status 1:command: /root/.virtualenvs/luffy/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s37bz0h2/uwsgi_245412f3673e459f820905c76006e8e8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s37bz0h2/uwsgi_245412f3673e459f820905c76006e8e8/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-gox6jioecwd: /tmp/pip-install-s37bz0h2/uwsgi_245412f3673e459f820905c76006e8e8/Complete output (99 lines):/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'descriptions'warnings.warn(msg)running bdist_wheelrunning buildrunning build_pycreating buildcreating build/libcopying uwsgidecorators.py -> build/libinstalling to build/bdist.linux-x86_64/wheelrunning installusing profile: buildconf/default.inidetected include path: ['/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include', '/usr/local/include', '/usr/include']Patching "bin_name" to properly install_scripts dirdetected CPU cores: 1configured 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_UUID -DUWSGI_VERSION="\"2.0.19.1\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="19" -DUWSGI_VERSION_REVISION="1" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -DUWSGI_XML -DUWSGI_XML_EXPAT -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 ***[gcc -pthread] core/utils.o[gcc -pthread] core/protocol.o[gcc -pthread] core/socket.o[gcc -pthread] core/logging.o[gcc -pthread] core/master.o[gcc -pthread] core/master_utils.o[gcc -pthread] core/emperor.o[gcc -pthread] core/notify.o[gcc -pthread] core/mule.o[gcc -pthread] core/subscription.o[gcc -pthread] core/stats.o[gcc -pthread] core/sendfile.o[gcc -pthread] core/async.o[gcc -pthread] core/master_checks.o[gcc -pthread] core/fifo.o[gcc -pthread] core/offload.o[gcc -pthread] core/io.o[gcc -pthread] core/static.o[gcc -pthread] core/websockets.o[gcc -pthread] core/spooler.o[gcc -pthread] core/snmp.o[gcc -pthread] core/exceptions.o[gcc -pthread] core/config.o[gcc -pthread] core/setup_utils.o[gcc -pthread] core/clock.o[gcc -pthread] core/init.o[gcc -pthread] core/buffer.o[gcc -pthread] core/reader.o[gcc -pthread] core/writer.o[gcc -pthread] core/alarm.o[gcc -pthread] core/cron.o[gcc -pthread] core/hooks.o[gcc -pthread] core/plugins.o[gcc -pthread] core/lock.o[gcc -pthread] core/cache.o[gcc -pthread] core/daemons.o[gcc -pthread] core/errors.o[gcc -pthread] core/hash.o[gcc -pthread] core/master_events.o[gcc -pthread] core/chunked.o[gcc -pthread] core/queue.o[gcc -pthread] core/event.o[gcc -pthread] core/signal.o[gcc -pthread] core/strings.o[gcc -pthread] core/progress.o[gcc -pthread] core/timebomb.o[gcc -pthread] core/ini.o[gcc -pthread] core/fsmon.o[gcc -pthread] core/mount.o[gcc -pthread] core/metrics.o[gcc -pthread] core/plugins_builder.o[gcc -pthread] core/sharedarea.o[gcc -pthread] core/rpc.o[gcc -pthread] core/gateway.o[gcc -pthread] core/loop.o[gcc -pthread] core/cookie.o[gcc -pthread] core/querystring.o[gcc -pthread] core/rb_timers.o[gcc -pthread] core/transformations.o[gcc -pthread] core/uwsgi.o[gcc -pthread] proto/base.o[gcc -pthread] proto/uwsgi.o[gcc -pthread] proto/http.o[gcc -pthread] proto/fastcgi.o[gcc -pthread] proto/scgi.o[gcc -pthread] proto/puwsgi.o[gcc -pthread] lib/linux_ns.o[gcc -pthread] core/zlib.o[gcc -pthread] core/regexp.o[gcc -pthread] core/routing.o[gcc -pthread] core/yaml.o[gcc -pthread] core/ssl.o[gcc -pthread] core/legion.o[gcc -pthread] core/xmlconf.o[gcc -pthread] core/dot_h.o[gcc -pthread] core/config_py.o*** uWSGI compiling embedded plugins ***[gcc -pthread] plugins/python/python_plugin.oIn file included from plugins/python/python_plugin.c:1:0:plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory#include <Python.h>^compilation terminated.----------------------------------------ERROR: Failed building wheel for uwsgiRunning setup.py clean for uwsgi
Failed to build uwsgi
Installing collected packages: uwsgiRunning setup.py install for uwsgi ... errorERROR: Command errored out with exit status 1:command: /root/.virtualenvs/luffy/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s37bz0h2/uwsgi_245412f3673e459f820905c76006e8e8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s37bz0h2/uwsgi_245412f3673e459f820905c76006e8e8/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-f9ma0ajt/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/luffy/include/site/python3.6/uwsgicwd: /tmp/pip-install-s37bz0h2/uwsgi_245412f3673e459f820905c76006e8e8/Complete output (92 lines):/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'descriptions'warnings.warn(msg)running installusing profile: buildconf/default.inidetected include path: ['/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include', '/usr/local/include', '/usr/include']Patching "bin_name" to properly install_scripts dirdetected CPU cores: 1configured 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_UUID -DUWSGI_VERSION="\"2.0.19.1\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="19" -DUWSGI_VERSION_REVISION="1" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -DUWSGI_XML -DUWSGI_XML_EXPAT -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 datecore/protocol.o is up to datecore/socket.o is up to datecore/logging.o is up to datecore/master.o is up to datecore/master_utils.o is up to datecore/emperor.o is up to datecore/notify.o is up to datecore/mule.o is up to datecore/subscription.o is up to datecore/stats.o is up to datecore/sendfile.o is up to datecore/async.o is up to datecore/master_checks.o is up to datecore/fifo.o is up to datecore/offload.o is up to datecore/io.o is up to datecore/static.o is up to datecore/websockets.o is up to datecore/spooler.o is up to datecore/snmp.o is up to datecore/exceptions.o is up to datecore/config.o is up to datecore/setup_utils.o is up to datecore/clock.o is up to datecore/init.o is up to datecore/buffer.o is up to datecore/reader.o is up to datecore/writer.o is up to datecore/alarm.o is up to datecore/cron.o is up to datecore/hooks.o is up to datecore/plugins.o is up to datecore/lock.o is up to datecore/cache.o is up to datecore/daemons.o is up to datecore/errors.o is up to datecore/hash.o is up to datecore/master_events.o is up to datecore/chunked.o is up to datecore/queue.o is up to datecore/event.o is up to datecore/signal.o is up to datecore/strings.o is up to datecore/progress.o is up to datecore/timebomb.o is up to datecore/ini.o is up to datecore/fsmon.o is up to datecore/mount.o is up to datecore/metrics.o is up to datecore/plugins_builder.o is up to datecore/sharedarea.o is up to datecore/rpc.o is up to datecore/gateway.o is up to datecore/loop.o is up to datecore/cookie.o is up to datecore/querystring.o is up to datecore/rb_timers.o is up to datecore/transformations.o is up to datecore/uwsgi.o is up to dateproto/base.o is up to dateproto/uwsgi.o is up to dateproto/http.o is up to dateproto/fastcgi.o is up to dateproto/scgi.o is up to dateproto/puwsgi.o is up to datelib/linux_ns.o is up to datecore/zlib.o is up to datecore/regexp.o is up to datecore/routing.o is up to datecore/yaml.o is up to datecore/ssl.o is up to datecore/legion.o is up to datecore/xmlconf.o is up to date[gcc -pthread] core/dot_h.o[gcc -pthread] core/config_py.o*** uWSGI compiling embedded plugins ***[gcc -pthread] plugins/python/python_plugin.oIn file included from plugins/python/python_plugin.c:1:0:plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory#include <Python.h>^compilation terminated.----------------------------------------
ERROR: Command errored out with exit status 1: /root/.virtualenvs/luffy/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s37bz0h2/uwsgi_245412f3673e459f820905c76006e8e8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s37bz0h2/uwsgi_245412f3673e459f820905c76006e8e8/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-f9ma0ajt/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/luffy/include/site/python3.6/uwsgi Check the logs for full command output.
(luffy) [root@VM-4-16-centos /home/luffy/project/luffyapi]#python --version

CentOS7安装uwsgi遇到的坑解决方法相关推荐

  1. CentOS7安装后没网络的解决方法

    文章目录 1.没有ifconfig命令 2.试试ip addr命令 3.修改网卡的配置文件 4.重启network服务 5.用ping验证 6.文章版权 CentOS 7最小化安装成功后缺省是不启动网 ...

  2. Linux系统软件安装更新下载太慢解决方法(更换国内源)

    Linux系统软件安装更新下载太慢解决方法(更换国内源) 快节奏的社会,最怕的就是其他因素拖慢自己的节奏,网速更是在当今社会体现的淋漓尽致,所以下载速度能不能快一点,虽然 Festinatione f ...

  3. centos7安装1080显卡驱动常见问题解决方法

    centos7安装1080显卡驱动常见问题解决方法 1.安装显卡时,出现以下错误 ERROR: The Nouveau kernel driver is currently in use by you ...

  4. php thrift 报错,thrift安装遇到的问题以及解决方法(必看篇)

    1. 必须安装boost.最新的稳定版是1.48.0. 1.1.先下载:http://sourceforge.NET/projects/boost/files/boost/1.48.0/ 选择tar. ...

  5. Centos系统上安装php遇到的错误解决方法集锦

    Centos系统上安装php遇到的错误解决方法集锦 1.configure: error: xml2-config not found. Please check your libxml2 insta ...

  6. Tesorflow源代码安装方式以及错误的解决方法

    Tesorflow源代码安装方式以及错误的解决方法 参考文章: (1)Tesorflow源代码安装方式以及错误的解决方法 (2)https://www.cnblogs.com/greentomlee/ ...

  7. ThinkPad安装deepin操作系统报错解决方法

    ThinkPad安装deepin操作系统报错解决方法 参考文章: (1)ThinkPad安装deepin操作系统报错解决方法 (2)https://www.cnblogs.com/haihua85/p ...

  8. Office安装时报错1907的解决方法

    Office安装时报错1907的解决方法 参考文章: (1)Office安装时报错1907的解决方法 (2)https://www.cnblogs.com/Harry-FeiLong/p/115685 ...

  9. Jenkins安装maven integration plugin失败解决方法

    Jenkins安装maven integration plugin失败解决方法 参考文章: (1)Jenkins安装maven integration plugin失败解决方法 (2)https:// ...

  10. 记一次用pip安装docker-compose报错及解决方法

    记一次用pip安装docker-compose报错及解决方法 参考文章: (1)记一次用pip安装docker-compose报错及解决方法 (2)https://www.cnblogs.com/fe ...

最新文章

  1. 2020年生肖码表图_2020年最好的计时码表,是这4款
  2. git 创建邮箱 用户名_git设置用户名和邮箱
  3. matlab2011实验3,matlab实验3探索.doc
  4. 要做好性能测试,该掌握些什么?
  5. 有趣又有用的皮托定理!
  6. mysql读写分离6_6\MySQL 主从同步 、 MySQL 读写分离 、 MySQL 性能调优
  7. C++ 信号处理 signal(SIGINT, signalHandler);
  8. drupal.behavior 和 document.ready 没有直接的关系
  9. N1盒子刷入codesys当PLC使用
  10. [Hacking]国内首届黑客大会COG2011现场报道(补)
  11. js alert追加html,利用JQ来美化Js的alert弹出框
  12. 数据安全平台——DSP
  13. 清北学堂2018noip集训D1
  14. 11.什么是Heuristic
  15. PCI驱动框架简单分析
  16. 关于长高问题 我的看法
  17. 四川华巨同诚:拼多多怎么规避店铺降权的问题
  18. 干货满满,Android热修复方案介绍
  19. 关于python语言概述
  20. emWin 2天速成实例教程012_基于STM32单片机的全键盘中文汉字拼音输入法

热门文章

  1. 小米笔记本android,小米笔记本同步助手下载
  2. Java链表与数组间的相互转换
  3. 手把手带你玩转Spark机器学习-专栏介绍
  4. win10 动态磁盘 linux,大师教你win10系统提示动态磁盘无效的详尽处理办法
  5. JAVA:实现HillCipher希尔密码算法(附完整源码)
  6. python-读取dcm文件-2021.5.24
  7. AI智能与C语言pdf,AI:人工智能的本质与未来 完整版pdf 含epub+mobi+azw3
  8. 中国信通院发布《区块链赋能新型智慧城市白皮书(2019年)》解读(附全文下载)
  9. Python正则表达式(附语法详解)
  10. 当区块链遇上财政电子票据