弹性云服务器 ECS-pip安装软件时出现错误:command ´gcc´ failed with exit status 1:问题描述

时间:2025-01-26 10:44:52

问题描述

安装Python库软件时,需配置pip源。以中国科技大学镜像源为例:
[root@test home]# cat /root/.pip/pip.conf [global]index-url = https://pypi.mirrors.ustc.edu.cn/simple/trusted-host = pypi.mirrors.ustc.edu.cn

安装过程中,系统报错"command ´gcc´ failed with exit status 1",如图1所示。但是,在用pip安装Python库软件之前,确认已经使用yum命令安装了gcc。

图1 安装报错
support.huaweicloud.com/trouble-ecs/ecs_trouble_0356.html