我正在尝试在 Centos 6.6 中创建一个 loca 存储库,所以:我创建了以下文件:
[local]
name=Centos $releasever-$basearch
baseurl=file://var/pub/rpms
gpgcheck=0
enabled=1
然后:
mkdir /var/pub/rpms
cp -r /media/Packages/* /var/pub/rpms/
createrepo /var/pub/rpms
[root@centos pub]# yum clean all
Complementos cargados:fastestmirror
Limpiando repositorios:base extras local updates
Limpiando todo
Cleaning up list of fastest mirrors
[root@centos pub]# yum repolist
Complementos cargados:fastestmirror
Determining fastest mirrors
* base: mirrors.dcarsat.com.ar
* extras: mirrors.dcarsat.com.ar
* updates: mirrors.dcarsat.com.ar
base | 3.7 kB 00:00
base/primary_db | 4.6 MB 00:04
extras | 3.4 kB 00:00
extras/primary_db | 31 kB 00:00
file://var/pub/rpms/repodata/repomd.xml: [Errno 14] Could not open/read file://var/pub/rpms/repodata/repomd.xml
Intentando con otro espejo.
file://var/pub/rpms/repodata/repomd.xml: [Errno 14] Could not open/read file://var/pub/rpms/repodata/repomd.xml
Intentando con otro espejo.
updates | 3.4 kB 00:00
updates/primary_db | 3.3 MB 00:03
id del repositorio nombre del repositorio estado
base CentOS-6 - Base 6.518
extras CentOS-6 - Extras 38
local Centos 6-x86_64 0
updates CentOS-6 - Updates 1.155
repolist: 7.711
[root@centos pub]# ls /var/pub/rpms/repodata/repomd.xml
/var/pub/rpms/repodata/repomd.xml
我什么都不懂:(
我究竟做错了什么?
答案1
错误出现在baseurl中:
不是:
baseurl=file://var/pub/rpms
但
baseurl=file:/var/pub/rpms
然后效果很好。