对于 CentOS 8,使用以下命令替换默认的配置
sudo sed -e ‘s|^mirrorlist=|#mirrorlist=|g‘ -e ‘s|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=https://mirrors.ustc.edu.cn/centos|g‘ -i.bak /etc/yum.repos.d/CentOS-Linux-AppStream.repo /etc/yum.repos.d/CentOS-Linux-BaseOS.repo /etc/yum.repos.d/CentOS-Linux-Extras.repo /etc/yum.repos.d/CentOS-Linux-PowerTools.repo /etc/yum.repos.d/CentOS-Linux-Plus.repo
替换之后请运行
yum makecache
更新缓存。
# 如果要备份原来的源
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo_bak
更新完成后 尝试安装python38使用
yum install python38
成功
到下面网址查询,比如安装glibc-devel
http://rpmfind.net/linux/rpm2html/search.php?query=glibc-devel
查找centos 8的源
wget http://rpmfind.net/linux/centos/8.3.2011/BaseOS/x86_64/os/Packages/glibc-devel-2.28-127.el8.x86_64.rpm
然后使用rpm -i安装
rpm -i glibc-devel-2.28-127.el8.x86_64.rpm
使用yum验证安装成功
yum install glibc-devel
安装某些依赖包:比如perl-Unicode-EastAsianWidth
https://pkgs.org/search/?q=Unicode-EastAsianWidth
wget http://mirror.centos.org/centos/8/PowerTools/x86_64/os/Packages/perl-Unicode-EastAsianWidth-1.33-13.el8.noarch.rpm
rpm -i perl-Unicode-EastAsianWidth-1.33-13.el8.noarch.rpm
原文:https://www.cnblogs.com/changryJB/p/14707777.html