[CentOS] Yum errors

Mon Jul 1 15:46:33 UTC 2013
Eero Volotinen <eero.volotinen at iki.fi>

try yum clean all ?
On Jul 1, 2013 6:07 PM, <me at tdiehl.org> wrote:

> On Mon, 1 Jul 2013, Reindl Harald wrote:
>
> >
> >
> > Am 01.07.2013 15:36, schrieb me at tdiehl.org:
> >> I have a c6.4 machine that recently had some file system corruption.
> fsck was able
> >> repair the file system but I am getting the following error when I try
> to
> >> do yum update:
> >>
> >> [Errno 21] Is a directory:
> '/var/lib/yum/yumdb/e/2f883c08e3b596b66fcc19c6b4d73b11c9aaa43e-e2fsprogs-1.41.12-14.el6_4.2-x86_64/checksum_type'
> >>
> >> In searching Google, some suggested renaming the yumdb but that just
> results
> >> in a traceback when I run yum
> >
> > you can do *without any issue*
> >
> > rm -rf /var/lib/yum/yumdb/*
> > rm -rf /var/lib/yum/history/*
> >
> > and after *twice* "yum history new" there are no longer tracebacks
> > been there, done that on a *lot* of machines multiple times to
> > get rid of this tons of old metadata with no benefit
>
> Ok, I am still getting a traceback, obviously, the first traceback is
> expected
> but the last one os not. Below is what I did:
>
> (router pts4) # cd /var/lib/yum/
> (router pts4) # rm -r history/ yumdb/
> (router pts4) # ll
> total 12
> drwxr-xr-x. 3 root root 4096 May  6 11:31 repos
> drwxr-xr-x. 3 root root 4096 Jun 29 14:14 rpmdb-indexes
> -rw-r--r--. 1 root root   36 May  6 11:31 uuid
> (router pts4) # yum history new
> Loaded plugins: downloadonly, fastestmirror, security
> Traceback (most recent call last):
>    File "/usr/bin/yum", line 29, in <module>
>      yummain.user_main(sys.argv[1:], exit_code=True)
>    File "/usr/share/yum-cli/yummain.py", line 285, in user_main
>      errcode = main(args)
>    File "/usr/share/yum-cli/yummain.py", line 136, in main
>      result, resultmsgs = base.doCommands()
>    File "/usr/share/yum-cli/cli.py", line 438, in doCommands
>      return self.yum_cli_commands[self.basecmd].doCommand(self,
> self.basecmd, self.extcmds)
>    File "/usr/share/yum-cli/yumcommands.py", line 1503, in doCommand
>      ret = self._hcmd_new(base, extcmds)
>    File "/usr/share/yum-cli/yumcommands.py", line 1423, in _hcmd_new
>      base.history._create_db_file()
>    File "/usr/lib/python2.6/site-packages/yum/history.py", line 1645, in
> _create_db_file
>      cur.execute(op)
> sqlite3.OperationalError: table trans_beg already exists
> (router pts4) # yum history new
> Loaded plugins: downloadonly, fastestmirror, security
> history new
> (router pts4) # yum update
> Loaded plugins: downloadonly, fastestmirror, security
> Loading mirror speeds from cached hostfile
>   * elrepo: elrepo.org
> Setting up Update Process
> Traceback (most recent call last):
>    File "/usr/bin/yum", line 29, in <module>
>      yummain.user_main(sys.argv[1:], exit_code=True)
>    File "/usr/share/yum-cli/yummain.py", line 285, in user_main
>      errcode = main(args)
>    File "/usr/share/yum-cli/yummain.py", line 136, in main
>      result, resultmsgs = base.doCommands()
>    File "/usr/share/yum-cli/cli.py", line 438, in doCommands
>      return self.yum_cli_commands[self.basecmd].doCommand(self,
> self.basecmd, self.extcmds)
> File "/usr/share/yum-cli/yumcommands.py", line 232, in doCommand
>      return base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
>    File "/usr/share/yum-cli/cli.py", line 725, in updatePkgs
>      self.update()
>    File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3735, in
> update
>      updates = self.up.getUpdatesTuples()
>    File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 906, in
> <lambda>
>      up = property(fget=lambda self: self._getUpdates(),
>    File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 726, in
> _getUpdates
>      self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(),
> self.pkgSack.simplePkgList())
>    File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 502, in
> simplePkgList
>      return self.pkglist
>    File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 232, in
> _get_pkglist
>      csumpkgtups = self.preloadPackageChecksums(load_packages=False)
>    File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 979, in
> preloadPackageChecksums
>      rpmdbv = self.simpleVersion(main_only=True)[0]
>    File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1163, in
> simpleVersion
>      self._put_cached_simpleVersion_main(main)
>    File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1112, in
> _put_cached_simpleVersion_main
>      os.rename(rpmdbvfname + ".tmp", rpmdbvfname)
> OSError: [Errno 21] Is a directory
> (router pts4) #
>
> As you can see, I am still getting the traceback.
>
> I also ran the following to be sure I was not missing something else:
> (router pts4) # rpm -qf /var/lib/yum
> yum-3.2.29-40.el6.centos.noarch
> (router pts4) # rpm -V yum
> (router pts4) #
>
> Any ideas what I am missing?
>
> Regards,
>
> --
> Tom                     me at tdiehl.org           Spamtrap address
>                me123 at tdiehl.org
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>