Centos已经停止维护了
bash
#yum makecache
Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-rh error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Cannot find a valid baseurl for repo: centos-sclo-rh/x86_64
bash
#解决办法
cd /etc/yum.repos.d
cp CentOS-SCLo-scl-rh.repo CentOS-SCLo-scl-rh.repo.bak
sed -i s/#baseurl/baseurl/ CentOS-SCLo-scl-rh.repo
sed -i s/mirrorlist.centos.org/mirrors.aliyun.com/ CentOS-SCLo-scl-rh.repo
sed -i s/mirror.centos.org/mirrors.aliyun.com/ CentOS-SCLo-scl-rh.repo
cp CentOS-SCLo-scl.repo CentOS-SCLo-scl.repo.bak
sed -i s/#baseurl/baseurl/ CentOS-SCLo-scl.repo
sed -i 's/# baseurl/baseurl/' CentOS-SCLo-scl.repo
sed -i s/mirrorlist.centos.org/mirrors.aliyun.com/ CentOS-SCLo-scl.repo
sed -i s/mirror.centos.org/mirrors.aliyun.com/ CentOS-SCLo-scl.repo
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' CentOS-Base.repo
yum clean all
yum makecache
https://dev.to/franzwong/fix-cannot-find-a-valid-baseurl-for-repo-in-centos-1h07