LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   yum & rpm showing errors (https://www.linuxquestions.org/questions/linux-software-2/yum-and-rpm-showing-errors-762119/)

harris4got 10-15-2009 10:45 AM

yum & rpm showing errors
 
Hello

I use a fedora 8 system. I had tried upgrading it to 10 before sometime. But some errors prevented me from doing so. Then onwards yum or rpm wouldnt install new softwares.Here is the error for yum update

Code:

# yum update
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 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 157, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 178, in getOptionsConfig
    pc = self.preconf
AttributeError: 'YumBaseCli' object has no attribute 'preconf'

And the error for rpm:

Code:

rpm -ivh python-mutagen-1.9-1.fc8.rf.noarch.rpm
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30975) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30975)
error: cannot open Packages database in /var/lib/rpm
warning: python-mutagen-1.9-1.fc8.rf.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 1aa78495
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30975) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages database in /var/lib/rpm

so i delete the db & rebuild it

Code:

# rm /var/lib/rpm/__db*
rm: remove regular empty file `/var/lib/rpm/__db.000'? y
rm: remove regular file `/var/lib/rpm/__db.001'? y
rm: remove regular file `/var/lib/rpm/__db.002'? y
rm: remove regular file `/var/lib/rpm/__db.003'? y
rm: remove regular file `/var/lib/rpm/__db.004'? y

# rpm -v --rebuilddb

# yum clean all
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 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 157, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 178, in getOptionsConfig
    pc = self.preconf
AttributeError: 'YumBaseCli' object has no attribute 'preconf'

Again the same error with yum.
Any help is appreciated.

favoretti 10-15-2009 11:01 AM

Can you do "grep -r preconf /etc/yum*" and see if there are any lines containing "preconf" in the configuration?
If there's one, either paste it here, or try commenting out.

harris4got 10-15-2009 11:14 AM

grep -r preconf /etc/yum* shows nothing..

knudfl 10-15-2009 01:32 PM

The 'yum' "python".py files looked for are in
/usr/share/yum-cli/
and
/usr/lib/python2.5/site-packages/yum/

But you may be out of luck using yum, as Fedora 8
was obsoleted January 2009.
May be by changing the repo link to "the old archive" :
e.g. i386
http://archives.fedoraproject.org/pu...thing/i386/os/
.....

lazlow 10-15-2009 02:37 PM

If you tried updating it to F10 via yum, that is the source of the issue. Fedora does(always has and probably always will) only officially support doing a clean install for upgrades.

harris4got 10-15-2009 02:57 PM

The problem it seems is not with the repositories, even yum -v gives the same error

# yum -v
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 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 157, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 178, in getOptionsConfig
pc = self.preconf
AttributeError: 'YumBaseCli' object has no attribute 'preconf'

Cant understand what is causing the problem.

lazlow 10-15-2009 04:17 PM

The problem is not JUST the repos. When you attempted to upgraded you wound up with a mix of F8 and F10 packages. The vast majority of these packages are not compatible.

chrism01 10-15-2009 07:57 PM

Lazlow is correct; give it up. Backup any data/cfgs you can't live without and do a fresh install (F10).
If /home is on a separate partition, you can preserve that during the install, but take a backup just in case.
If you want a stable long term RH style OS, switch to Centos; I did.
Each Fedora only lasts 13 mths...

harris4got 10-15-2009 10:59 PM

Thanks
 
Thank you all,but I thought there would be a way out of this without a fresh install. But thanks anyway.

John VV 10-15-2009 11:15 PM

nope do a fresh install , and welcome to the fedora "mare-go-round "
sometimes a upgrade from one to the next works ( fedora 9 to 10 might ) but there were to many changes in 11 that a upgrade is not relay possible for 11

fresh install.


All times are GMT -5. The time now is 08:11 PM.