Centos7更換源失敗 file: file:///etc/yum.repos.d/。。。


[root@manager yum.repos.d]# yum makecache

Loaded plugins: fastestmirror, security
Error: File contains no section headers.

file: file:///etc/yum.repos.d/6CentOS-Base.repo, line: 1
'\r\n'

這是啥情況,問題在於你下載的不對,這里建議使用瀏覽器下載,然后上傳至服務器。

[root@manager yum.repos.d]# file CentOS6-Base-163.repo 
CentOS6-Base-163.repo: ASCII English text

當你使用wget下載的時候,請確認下file出來是否為ASCII English text,必須是這個格式。

原因:在網絡的出口有限制,導致異常!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM