配置yum源遇到的问题

yun配置文件

[ambari]
name=local iso
baseurl=file:///home/redhat-iso/ #填写挂载镜像的位置
enable=1
gpgcheck=1 #gpg签名校验 默认关闭
gpgkey=file:///home/redhat-iso/RPM-GPG-KEY-CentOS-6 #该处的gpgkey文件应该改成iso镜像中的文件名

报错

已加载插件:fastestmirror
Repository ‘centos7-media’: Error parsing config: Error parsing “gpgkey = ‘file://media/cdrom/RPM-GPG-KEY-CentOS-7 #GPG-KEY\xe6\x96\x87\xe4\xbb\xb6\xe8\xb7\xaf\xe5\xbe\x84’”: URL must be http, ftp, file or https not “”

原因:是因为配置文件中有注释,把注释去掉就好了

阿里云源下载命令

wget http://mirrors.aliyun.com/repo/Centos-7.repo

结束需要clean all and makecache

[root@centos7-web ~]# yum clean all

[root@centos7-web ~]# yum makecache

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值