can't read /etc/yum.repos.d/CentOS-Base.repo: No such file or directory in config.sh of CentOS-8

208 views
Skip to first unread message

koti....@gmail.com

unread,
Jan 7, 2021, 7:11:16 AM1/7/21
to kiwi
Hi,

In CentOS-8 ova image generated by kiwi ng, dnf commands are failing with following error:
"Failed to download metadata for repo 'AppStream': repomd.xml parser error "
 
So as a fix,  we have to comment the mirrorlist and uncomment the baseurl for repos CentOS-AppStream.repo, CentOS-BaseOS.repo, & CentOS-Extras.repo.

So I added following commands to input/kiwi/config.sh
sed -i '/mirrorlist/s/^/#/g' /etc/yum.repos.d/CentOS-Base.repo 
sed -i '/baseurl/s/^#//g' /etc/yum.repos.d/CentOS-Base.repo

but it is failing with following error: 
sed: can't read /etc/yum.repos.d/CentOS-Base.repo: No such file or directory  

Please help.
Regards,
Koteswar

koti....@gmail.com

unread,
Jan 7, 2021, 8:43:12 AM1/7/21
to kiwi
/etc/yum.repos.d/CentOS-Base.repo file will not be available while running input/kiwi/config.sh? 
Reply all
Reply to author
Forward
0 new messages