Was: Software manager crashes in GUI Now: Yum Issue

Nigel Henry cave.dnb at tiscali.fr
Tue Jul 18 19:55:39 UTC 2006


On Tuesday 18 July 2006 19:56, Jack Gates wrote:
> On Friday 07 July 2006 13:45, Phil Meyer wrote:
> > Jack Gates wrote:
> > > When I run any yum command other than yum list installed, I get this
> > > error:
> > >
> > > Searching Packages:
> > > Setting up repositories
> > > core
> > > [1/5] updates-released
> > >  [2/5] extras
> > >   [3/5] updates
> > >    [4/5] base
> > >     [5/5] Reading repository metadata in from local files
> > > Error: Caching enabled and local
> > > cache: //var/cache/yum/updates-released/primary.xml.gz does not match
> > > checksum
> > >
> > > I have no idea how to fix this.  Can some one help out?
> >
> > This occurs when the yum repository you last visited has a different
> > checksum for the file.  Happens quite often if you maintain a local
> > repository and then hit an outside one.
> >
> > What is supposed to happen is that if the file is at all different it
> > should load it again.  But to make caching at all efficient, there is a
> > window of time where yum will make assumptions based upon the last run,
> > and sometimes those assumptions can be wrong.  Especially in dealing
> > with repositories that change as frequently as Fedora repositories do.
> >
> > Simple to fix:
> >
> > sudo yum clean all
> >
> > Now, try that yum install again.
> >
> > If you wish to avoid the problem as much as possible in the future, it
> > requires that you manually edit the /etc/yum.repos.d/* files and put the
> > mirrors you like first on the list.  There is no way that anyone can
> > predict which repositories would work best for you, so you have to dig
> > for yourself.
> >
> > It is valid to add a baseurl line before the mirrorlist line in a repo
> > file.
> >
> > Example ONLY:
> >
> > [extras]
> > name=Fedora Extras $releasever - $basearch
> > baseurl=http://mirror.hiwaay.net/redhat/fedora/linux/extras/$releasever/$
> >ba search/
> > mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-$relea
> >se ver failovermethod=priority
> > enabled=1
> > gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
> > gpgcheck=1
> >
> > try:
> >  wget -O /tmp/mirr
> > http://fedora.redhat.com/download/mirrors/fedora-extras-5 and look at
> > /tmp/mirr for a list to choose from.  This list changes frequently.
> >
> > Do this for each repository.
> >
> > Another good way is to do a large yum update and during the downloads,
> > hit ^C to cycle through the mirrors until you get a great one.  Then in
> > another window do: tethereal
> > and watch a moment to see where you are currently getting it from, and
> > use that one in your updates repo file.
> >
> > Hope this helps.

Hi Jack. I use Apt almost 100%, but perhaps I can help you understand a bit 
about Yum. Corrections welcome.
>
> I was able to get yum to work as was shared above.  I am wondering if my
> system is up to date or if I am missing something.  Should I add or delete
> anything to any of these files below?
>
> example from one of my files below
>
> # PUT YOUR REPOS HERE OR IN separate files named file.repo
>
> How should a file.repo be configured?
>
> I just added this to /etc/yum.conf.rpmnew
>
> [extras]
> name=Fedora Extras $releasever - $basearch
> baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$ARCH/

You don't need to add the extras repo to /etc/yum.conf, as it's already 
in /etc/yum/repos.d directory. 
> # in /etc/yum.repos.d  *What does this line mean?*

this means that you can either add a new repo to /etc/yum.conf, or create a 
new file in /etc/yum/repos.d and put your new repo in that file.

If you have a look in /etc/yum/repos.d, you will see that there are several 
files. Some of these are unused as default, and to use them you need to 
enable the specific repos you want to use in them. the line that needs to be 
changed is the "enabled" one. For example "enabled=0" means that repo is 
disabled, and "enabled=1" means the repo is enabled.

Look at the extras file. You will see 3 repos here. The main extras repo, 
which should be enabled=1, and a debug repo, and a repo for sources. Both 
these should be enabled=0 as default. If you want to install source packages, 
or debuginfo from extras, you will have to change these repos to enabled=1.

Looking back to when you first ran yum update. No doubt there were loads of 
updates. Before I installed Apt on FC5, I used Yum, and the updates as they 
were starting to install, or was that DL, told me the GPG key wasn't 
installed. ? "Do you want to install it?" Obviously yes. So now I have the 
GPG key installed for updates, and the updates should be DL'd, and installed. 
Each repo appears to have it's own GPG key, so, if for instance you decide to 
install Apt, which is in extras, you will be asked to verify the installation 
of the GPG extras key. The same goes for the other repos.

If you want to add new repos to /etc/yum.conf, you will have to install the 
GPG keys for them manually, but enough for now. Post back if you still have 
problems.

Nigel.






>
>
>
> /etc/yum.conf
>
> [main]
> cachedir=/var/cache/yum
> debuglevel=2
> logfile=/var/log/yum.log
> pkgpolicy=newest
> distroverpkg=redhat-release
> tolerant=1
> exactarch=1
> retries=20
>
> #[base]
> #name=Fedora Core $releasever - $basearch - Base
> #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releaseve
>r/$basearch/os /
> #baseurl=http://mirror.linux.duke.edu/pub/fedora/linux/core/
>
> #[updates-released]
> #name=Fedora Core $releasever - $basearch - Released Updates
> #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$r
>eleasever/$bas earch/
> #baseurl=http://mirror.linux.duke.edu/pub/fedora/linux/core/updates
>
> #[updates-testing]
> #name=Fedora Core $releasever - $basearch - Unreleased Updates
> #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/te
>sting/$release ver/$basearch/
>
> #[development]
> #name=Fedora Core $releasever - Development Tree
> #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/developmen
>t/$basearch/
>
>
>
> /etc/yum.conf.rpmnew
>
> [main]
> cachedir=/var/cache/yum
> keepcache=0
> debuglevel=2
> logfile=/var/log/yum.log
> pkgpolicy=newest
> distroverpkg=redhat-release
> tolerant=1
> exactarch=1
> obsoletes=1
> gpgcheck=1
> plugins=1
> metadata_expire=1800
>
> # PUT YOUR REPOS HERE OR IN separate files named file.repo
> [extras]
> name=Fedora Extras $releasever - $basearch
> baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$ARCH/
> # in /etc/yum.repos.d
>
>
>
> /etc/yum.repos.d
>
> total 80
> drwxr-xr-x  2 root root  4096 Apr 26 15:29 ./
> drwxr-xr-x 99 root root 12288 Jul 18 05:46 ../
> -rw-r--r--  1 root root   840 Mar 14 18:20 fedora-core.repo
> -rw-r--r--  1 root root  1549 Mar 14 18:20 fedora-development.repo
> -rw-r--r--  1 root root   780 Mar 14 18:20 fedora-extras-development.repo
> -rw-r--r--  1 root root   763 Mar 14 18:20 fedora-extras.repo
> -rw-r--r--  1 root root   486 Mar 14 18:20 fedora-legacy.repo
> -rw-r--r--  1 root root   790 Mar 14 18:20 fedora-updates.repo
> -rw-r--r--  1 root root   865 Mar 14 18:20 fedora-updates-testing.repo
>
>
> Thanks for any help,
> Jack
>
> --
> Jack Gates http://www.jlgates.com/
> http://www.myenergyproducts.com/




More information about the fedora-list mailing list