安装Harbor遇到的小问题

在安装harbor的时候,执行安装dokcer-compose时候报出 “ _posixsubprocess.c:16:20: 致命错误:Python.h:没有那个文件或目录“错误,错误信息如下:
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o
    _posixsubprocess.c:16:20: 致命错误:Python.h:没有那个文件或目录
     #include "Python.h"

起初我以为是gcc的问题,后来发现不是这个问题
[root@Harbor ~]# yum -y install gcc 
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.njupt.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
软件包 gcc-4.8.5-39.el7.x86_64 已安装并且是最新版本
无须任何处理

解决办法

[root@Harbor ~]# yum -y install python-devel
# 再次执行安装即可成功安装
[root@Harbor ~]# pip install docker-compose

你可能感兴趣的:(linux)