本地的配置文件为local.repo,新建的配置文件需要注意,“[]”里面的名字需要注意顺序,如本地local.repo文件里面的为[development],则新建的配置文件需要优先被建立缓存的时候,需要在[]中的名字优先被读取,如[a],[develop]……等等
yum缓存建立的顺序导致文件安装失败,下面是正确的
[root@localhost yum.repos.d]# yum -y clean all Loaded plugins: fastestmirror, refresh-packagekit, security Cleaning repos: devel development Cleaning up Everything Cleaning up list of fastest mirrors [root@localhost yum.repos.d]# yum makecache Loaded plugins: fastestmirror, refresh-packagekit, security Determining fastest mirrors devel | 2.9 kB 00:00 ... devel/filelists_db | 33 kB 00:00 ... devel/primary_db | 68 kB 00:00 ... devel/other_db | 17 kB 00:00 ... development | 4.0 kB 00:00 ... development/group_gz | 220 kB 00:00 ... development/filelists_db | 5.8 MB 00:00 ... development/primary_db | 4.4 MB 00:00 ... development/other_db | 2.7 MB 00:00 ... Metadata Cache Created
本地有两个*.repo文件时,新的repo文件中[]里面的内容建议比老repo文件中的[]里面的内容简短,使新repo能先被建立缓存