LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-21-2011, 09:24 AM   #1
griffey
Member
 
Registered: Jan 2004
Location: East Central Illinois
Distribution: RHEL 4/5/6 and Fedora
Posts: 81

Rep: Reputation: 15
Problems with Yum: error: unrecognized db option: "usecursors" ignored.


Hi folks.

I noticed one of the systems I support was showing up in RHN as not having been updated in a while, so I logged in to take a look, and found that something is messed up with yum (?).

Code:
[root@server ~]# yum update
error: dbiOpen: dbapi 1 not available
error: cannot open Packages database in /var/lib/rpm
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 254, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 88, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 192, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 778, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 256, in _getConfig
    startupconf = config.readStartupConfig(fn, root)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 835, in readStartupConfig
    startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 968, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
_rpm.error: rpmdb open failed
So I tried the following:

Code:
rm /var/lib/rpm/__db*
rpm -vv --rebuilddb
Now the error is even goofier:

Code:
[root@server rpm]# yum update
error: unrecognized db option: "usecursors" ignored.
error: unrecognized db option: "usecursors" ignored.
error: unrecognized db option: "usecursors" ignored.
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 254, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 88, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 192, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 778, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 256, in _getConfig
    startupconf = config.readStartupConfig(fn, root)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 835, in readStartupConfig
    startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 983, in _getsysver
    hdr = idx.next()
StopIteration

If I put that line about "usecursors" into Google along with the word yum I don't even get any results returned.

df -h shows that / is about 96% full, but it still has at least 2 gigs of free space, so while I was guessing at first that might be an issue, I wouldn't think yum would need more than 2 gigs of space to work with, right?

Code:
yum clean all
also blows up.

If anyone has any ideas, I'd love to hear them.

I may need to go knock a grad student upside the head--I just reformatted this machine like two months ago for them...

Thanks!

G.--
 
Old 04-22-2011, 09:33 AM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,648

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Whenever yum craps out because of the database, I generally rebuild the rpm database and try again. SOmetimes it works, sometimes it doesn't, but I figure it shouldn't do any harm
 
Old 04-26-2011, 10:36 AM   #3
griffey
Member
 
Registered: Jan 2004
Location: East Central Illinois
Distribution: RHEL 4/5/6 and Fedora
Posts: 81

Original Poster
Rep: Reputation: 15
Thanks for your reply.

Isn't that what I did with:

Code:
rm /var/lib/rpm/__db*
rpm -vv --rebuilddb
Or is there something else I need to do?

Thanks!

Mike
 
Old 04-26-2011, 03:04 PM   #4
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,648

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Quote:
Originally Posted by griffey View Post
Thanks for your reply.

Isn't that what I did with:
Code:
rm /var/lib/rpm/__db*
rpm -vv --rebuilddb
Or is there something else I need to do?

Thanks!

Mike
Yeah, I suspect you're right. The rebuilddb option doesn't show up in the man page for my version of rpm (rpm-4.9.0-6.fc15.x86_64), even though it apparently works, so I've been using the rpmdb command when I need to rebuild the database.

Sorry I wasn't able to help
 
Old 04-28-2011, 09:37 AM   #5
griffey
Member
 
Registered: Jan 2004
Location: East Central Illinois
Distribution: RHEL 4/5/6 and Fedora
Posts: 81

Original Poster
Rep: Reputation: 15
Don't sweat it--thanks for trying. It doesn't help much when one googles "error: unrecognized db option: usecursors ignored" and it returns 8 hits and all of them are links to my question about it. Sigh. I'm going to come at this from a different angle...
 
Old 04-28-2011, 09:46 AM   #6
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,648

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Is rpm working properly? The options I usually try are:
Code:
rpm -ivh <some-rpm-file>
rpm -e <some-rpm-file>
rpm -qi <some-rpm-file>
rpm -ql <some-rpm-file>
rpm -qa --last
I've encountered situations where parts of rpm are broken, which can break yum.
 
Old 04-28-2011, 10:03 AM   #7
griffey
Member
 
Registered: Jan 2004
Location: East Central Illinois
Distribution: RHEL 4/5/6 and Fedora
Posts: 81

Original Poster
Rep: Reputation: 15
Yeah, something is screwed up with rpm.

rpm -qa returns *nothing*.

Ugh. And now I just deleted the __db* files again and did "rpm -vv --rebuilddb" and it didn't create new ones (I also tried "rpmdb --rebuilddb" with the same results).

I have a feeling I'm just going to blow away this box and start from scratch...

G.--
 
Old 04-28-2011, 03:37 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,331

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
from fedora and cent , now SL
the rebuilddb dose not allways do the trick

there are two ways if one errors then the second most of the time works .It is a matter of the order
Code:
su -
yum clean all
rpm --rebuilddb 
yum update
the second is just in a different order
Code:
su -
rpm --rebuilddb 
yum clean all
yum update
and if that dose not do it ?
the error is showing a python issue
Quote:
File "/usr/share/yum-cli/cli.py", line 192, in getOptionsConfig
rhel,cent,and fedora are VERY dependent on the version of python in the BASE REPO !!!
if a different version gets installed then "all kinds of "bleeped" can rain down "
so check the version of python that is installed against the RHN version
 
1 members found this post helpful.
Old 04-28-2011, 03:55 PM   #9
griffey
Member
 
Registered: Jan 2004
Location: East Central Illinois
Distribution: RHEL 4/5/6 and Fedora
Posts: 81

Original Poster
Rep: Reputation: 15
Thanks for this reply too, John. As I mentioned in the semi-related thread, I'm going to just blow this thing away and start from scratch. It's not my server, and shouldn't technically even be my problem.

Take care.

G.--
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postgresql-8.4.2 error: unrecognized configuration parameter "max_fsm_pages" Kropotkin Linux - Server 2 12-29-2009 11:22 AM
cc1: error: unrecognized command line option "-mapcs-32" vengat Linux - Hardware 0 04-29-2008 02:18 AM
unrecognized command line option "-mapcs-32" vengat Linux - Hardware 1 04-26-2008 12:07 AM
"ld unrecognized option '--as-needed'" aoe2bug Slackware 5 08-17-2004 05:59 PM
anging "Protocol" option to "IMPS/2" in XF86Config-4 causes problems zstingx Linux - General 2 10-27-2003 09:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration