Re: YumRepo Error: All mirror URLs are not using ftp, http[s] or file.

James Antill <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
Chad Woolley <[email protected]> writes:

> Hello.  I'm getting this error when running yum with --installroot (it
> works fine without).  I've tried copying all [i think] of the yum
> config files from the /etc to etc under the installroot.  Googling,
> including the archives of this list, didn't help.  This is on CentOS
> 5.5.    Any ideas or tips?
>
> Thanks...
> -- Chad
>
> $ sudo yum -y --installroot=/mnt/stage2 groupinstall Base
> Loaded plugins: fastestmirror
> Loading mirror speeds from cached hostfile
> YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
>  Eg. $releasever is not a valid release or hasnt been released yet/
> removing mirrorlist with no valid mirrors:

 This is the main problem, $releasever is set by looking in the rpmdb
and seeing what provides redhat-release. However with the first run
of --installroot you don't have an rpmdb, and so $releasever is unset.
 With newer versions of yum you can use --releasever=/ etc. but for
older versions of yum you'll have to edit all your .repo files and
manually change the $releasever to something.

> /mnt/stage2/var/cache/yum/addons/mirrorlist.txt
> Error: Cannot find a valid baseurl for repo: addons

-- 
James Antill -- [email protected]
http://yum.baseurl.org/wiki/releases
http://yum.baseurl.org/wiki/whatsnew/3.2.29
http://yum.baseurl.org/wiki/YumMultipleMachineCaching
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.