过于相信人工智能
配置YUM源
由于电脑受限制 , 不能访问境外网站,所以用不了centos自带的源 ,是报404的
根据AI的说法换阿里云的YUM源
编辑 /etc/yum.repos.d/CentOS-Base.repo ,更换为
- 配置完成后sudo yum clean all清除yum缓存
验证AI配置结果
sudo yum update 提示获取GPG秘钥失败,报404
翻来覆去找ai查问题 , 一直没解决 ,结果翻了一下ai一下就解决了,包括手动导入
sudo rpm --import https://www.centos.org/keys/RPM-GPG-KEY-CentOS7
问题仍然一样 ,
解决问题
结果是GPT3.5给的gpgkey值给错了 , 最后的CentOS7改为CentOS-7就可以了,
完整的YUM源
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7