1、ubuntu源配置
1)先查电脑版本型号:
lsb_release -c
2)再编辑源更新,源要与上面型号对应
参考:https://midoq.github.io/2022/05/30/Ubuntu20-04%E6%9B%B4%E6%8D%A2%E5%9B%BD%E5%86%85%E9%95%9C%E5%83%8F%E6%BA%90/
/etc/apt/sources.list
3)更新源配置
apt update
apt upgrade
2、centos源配置
参考:
https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11iDH0bA
https://baijiahao.baidu.com/s?id=1748983525892204100&wfr=spider&for=pc
https://cloud.tencent.com/developer/article/2094265
1)下载
cd /etc/yum.repos.d
##下载
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
##备份
mv CentOS-Base.repo CentOS-Base.repo.bak
mv CentOS7-Base-163.repo CentOS-Base.repo
2)更新
#配置生效
yum makecache
#验证yum源
yum repolist
#更新包
yum clean all
yum update