【无标题】


yum源不能用?想换yum源?比如,换成清华的?

CentOS-Base.repo

The mirror system uses the connecting IP address of the client and the

update status of each mirror to pick mirrors that are updated to and

geographically close to the client. You should use this for CentOS updates

unless you are manually picking other mirrors.

If the mirrorlist= does not work for you, as a fall back you can try the

remarked out baseurl= line instead.

[base]

name=CentOS-$releasever - Base

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/ r e l e a s e v e r / o s / releasever/os/ releasever/os/basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=KaTeX parse error: Expected 'EOF', got '&' at position 11: releasever&̲arch=basearch&repo=os

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates

[updates]

name=CentOS-$releasever - Updates

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/ r e l e a s e v e r / u p d a t e s / releasever/updates/ releasever/updates/basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=KaTeX parse error: Expected 'EOF', got '&' at position 11: releasever&̲arch=basearch&repo=updates

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/ r e l e a s e v e r / e x t r a s / releasever/extras/ releasever/extras/basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=KaTeX parse error: Expected 'EOF', got '&' at position 11: releasever&̲arch=basearch&repo=extras

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/ r e l e a s e v e r / c e n t o s p l u s / releasever/centosplus/ releasever/centosplus/basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=KaTeX parse error: Expected 'EOF', got '&' at position 11: releasever&̲arch=basearch&repo=centosplus

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

换完之后,你发现还是不能用,出现如下报错:
https://mirrors.tuna.tsinghua.edu.cn/centos/ r e l e a s e v e r / o s / x 8 6 6 4 / r e p o d a t a / r e p o m d . x m l : [ E r r n o 14 ] H T T P S E r r o r 404 − N o t F o u n d 这个时候你是不是可能觉得 y u m 源地址出现了问题?你可以把这个地址用浏览器打开,你会发现,这个网页同样是 404 但你把 releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found 这个时候你是不是可能觉得yum源地址出现了问题? 你可以把这个地址用浏览器打开,你会发现,这个网页同样是404 但你把 releasever/os/x8664/repodata/repomd.xml:[Errno14]HTTPSError404NotFound这个时候你是不是可能觉得yum源地址出现了问题?你可以把这个地址用浏览器打开,你会发现,这个网页同样是404但你把releasever这个变量换成值就行了,比如centos7就填个7,这样就能正常访问了。那就说明,这个网址是没问题的,问题是出在centos解析不了releasever这个变量,把repo文本里的变量全部替换成相应的数值就行了。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值