Problems with Yum: error: unrecognized db option: "usecursors" ignored.
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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
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.
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...
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...
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.