“Centos 8安装psutil”的版本间的差异
来自CloudWiki
(创建页面,内容为“==背景== Linux服务器CentOS 8版本操作系统执行宝塔安装命令报错如下图: <nowiki>Error: Failed to download metadata for repo 'epel' Errors d…”) |
小 (Cloud17移动页面Centos 8安装Flask至Centos 8安装psutil) |
(没有差异)
|
2022年5月26日 (四) 01:42的最新版本
背景
Linux服务器CentOS 8版本操作系统执行宝塔安装命令报错如下图:
Error: Failed to download metadata for repo 'epel' Errors during downloading metadata for repository 'epel': - Status code: 404 for http://archives.fedoraproject.org/pub/archive/epel/8/Everything/x86_64/repodata/repomd.xml (IP: 38.145.60.24) Error: Failed to download metadata for repo 'epel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
原因:第三方的镜像站中均已移除CentOS 8的源,Centos 8版本已停止更新相应依赖导致的,下载新的yum源即可搞定。
备份yum源
mv /etc/yum.repos.d /etc/yum.repos.d.bak
==新建yum源 mkdir -p /etc/yum.repos.d
curl https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo > /etc/yum.repos.d/Centos-vault-8.5.2111.repo
curl https://mirrors.aliyun.com/repo/epel-archive-8.repo > /etc/yum.repos.d/epel-archive-8.repo
清除缓存
yum clean all
yum makecache
安装python-devel
yum -y install python-devel
如果上面这个命令不成功,则执行下面这个:
yum install python36-devel
安装psutil
pip3 install psutil