重慶思莊Linux技術(shù)分享-配置yum本地源后報(bào)錯(cuò):Bad id for repo
在一個(gè)新的Linux系統(tǒng)中配置yum源時(shí),yum makecache報(bào)錯(cuò)
Bad id for repo: yum, byte = 6
There are no enabled repos.
檢查yum源的配置信息,發(fā)現(xiàn)[]里面的內(nèi)容存在空格
[CentOS 7.9]
name=CentOS79
baseurl=file:///mnt/
enable=1
gpgcheck=0
進(jìn)行修改:
[CentOS7.9]
name=CentOS79
baseurl=file:///mnt/
enable=1
gpgcheck=0
再次makecache正常
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
yum resource? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?| 3.4 kB??00:00:00
(1/4): yumresource/ group_gz? ?? ?? ?? ?? ?? ?? ?? ???| 153 kB??00:00:00
(2/4): yumresource / filelists_db? ?? ?? ?? ?? ?? ?? ?? ?| 3.3 MB??00:00:00? ???
(3/4): yumresource/ primary_db? ?? ?? ?? ?? ?? ?? ?? ?| 3.3 MB??00:00:00? ???
(4/4): yumresource /other_db? ?? ?? ?? ?? ?? ?? ?? ???| 1.3 MB??00:00:00