当前位置:论坛首页 > Linux面板 > 求助

Utuntu 16.04.3 lts 安装出错 psutil installation failed

发表在 Linux面板2018-4-16 10:38 [复制链接] 5 2981

本帖最后由 lcsoul 于 2018-4-16 10:41 编辑

系统:Utuntu 16.04.3 lts

错误:
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/psutil
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=522 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
psutil/_psutil_linux.c:12:20: fatal error: Python.h: No such file or directory
#include <Python.h>
                    ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
=================================================
psutil installation failed.

求大神

使用道具 举报 只看该作者 回复
发表于 2018-4-16 10:58:59 | 显示全部楼层
输入这条命令看看
  1. sudo apt-get install -y gcc g++
复制代码

使用道具 举报 回复 支持 反对
发表于 2018-4-16 11:08:59 | 显示全部楼层
河妖 发表于 2018-4-16 10:58
输入这条命令看看

Reading package lists... Done
Building dependency tree      
Reading state information... Done
gcc is already the newest version (4:4.8.2-1ubuntu6).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


然后问题依旧
使用道具 举报 回复 支持 反对
发表于 2018-4-16 11:26:48 | 显示全部楼层
  1. gcc -v
复制代码

输入这条命令
看看
使用道具 举报 回复 支持 反对
发表于 2018-4-16 14:44:50 | 显示全部楼层
本帖最后由 lcsoul 于 2018-4-16 14:46 编辑
河妖 发表于 2018-4-16 11:26
输入这条命令
看看

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.4' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4)

使用道具 举报 回复 支持 反对
发表于 2020-4-26 12:52:08 | 显示全部楼层
解决了吗?我现在也遇到了这个问题,希望能够得到解决
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理

工作时间:09:00至24:00

快速回复 返回顶部 返回列表