FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 03-20-2011, 11:28 AM
Krosh Ivanov
 
Default Yum crashed

Hi folks,
I think my yum installation crashed, but I tried following some hints
given by some sites, nothing works. Error message is here:
http://paste.ideaslabs.com/show/n5Wfu6wqja

Thanks in advance,
Ivan
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 03-20-2011, 04:18 PM
Kevin Fenzi
 
Default Yum crashed

On Sun, 20 Mar 2011 12:28:09 +0000
Krosh Ivanov <krosh.ivan@gmail.com> wrote:

> Hi folks,
> I think my yum installation crashed, but I tried following some hints
> given by some sites, nothing works. Error message is here:
> http://paste.ideaslabs.com/show/n5Wfu6wqja

Can you provide some more information?

rpm -q yum fedora-release
cat /etc/fedora-release

When did it last work correctly?
What changed?
What is the full command you are running?

kevin
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 03-20-2011, 05:02 PM
stan
 
Default Yum crashed

On Sun, 20 Mar 2011 12:28:09 +0000
Krosh Ivanov <krosh.ivan@gmail.com> wrote:

> I think my yum installation crashed, but I tried following some hints
> given by some sites, nothing works. Error message is here:
> http://paste.ideaslabs.com/show/n5Wfu6wqja

The key part is

File "/usr/lib/python2.6/site-packages/yum/config.py", line 1010, in
_getsysver hdr = idx.next()
StopIteration

On my F14 system, that file, config.py is in python2.7. So you must
be running an earlier Fedora that still uses python 2.6. The function
being called is defined on my system as

def _getsysver(installroot, distroverpkg):
'Calculate the release version for the system.

@param installroot: The value of the installroot option.
@param distroverpkg: The value of the distroverpkg option.
@return: The release version as a string (eg. '4' for FC4)
'
ts = rpmUtils.transaction.initReadOnlyTransaction(root= installroot)
ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPM VSF_NODIGESTS))
try:
idx = ts.dbMatch('provides', distroverpkg)
except TypeError, e:
# This is code for "cannot open rpmdb"
# this is for pep 352 compliance on python 2.6 and above
if sys.hexversion < 0x02050000:
if hasattr(e,'message'):
raise Errors.YumBaseError("Error: " + str(e.message))
else:
raise Errors.YumBaseError("Error: " + str(e))
raise Errors.YumBaseError("Error: " + str(e))
except rpm.error, e:
# This is the "new" code for "cannot open rpmdb", 4.8.0 ish
raise Errors.YumBaseError("Error: " + str(e))
# we're going to take the first one - if there is more than one of these
# then the user needs a beating
if idx.count() == 0:
releasever = '$releasever'
else:
hdr = idx.next()
releasever = hdr['version']
del hdr
del idx
del ts
return releasever

The line that's failing is the line where it is trying to get the next
hdr value from an iterator. It seems there is an inconsistency between
the count idx is providing and the actual available. It thinks there
is one, but it isn't there.

If you are feeling adventurous, you could comment out the whole if /
else block and just replace it with releasever = '$releasever' suitably
indented (at the same level as the if / else block).

Another option is to put in a print statement to gather the values that
are being passed to the function when it fails. Then run the python
command line interpreter, import this module, and manually execute the
various steps to see what is happening.

This seems to be a bug, but as Kevin said, it will take more
information to determine that.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 03-20-2011, 07:58 PM
Krosh Ivanov
 
Default Yum crashed

Output of commands: http://paste.ideaslabs.com/show/Gz39dMdbOs.
Well, it doesn't matter the way I use yum, the error is the same. I
think I've changed nothing related to yum configuration or to
something important to it. The package 'yum' is not found anymore
because I removed some files from db, but I had got the error before
doing that.

Thanks
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 03-21-2011, 04:01 PM
stan
 
Default Yum crashed

On Sun, 20 Mar 2011 20:58:54 +0000
Krosh Ivanov <krosh.ivan@gmail.com> wrote:

> Output of commands: http://paste.ideaslabs.com/show/Gz39dMdbOs.
> Well, it doesn't matter the way I use yum, the error is the same. I
> think I've changed nothing related to yum configuration or to
> something important to it. The package 'yum' is not found anymore
> because I removed some files from db, but I had got the error before
> doing that.

If I understand the output you posted and your comments above
correctly, you have made direct changes to files under package
management (rpm) without going through yum or a similar manager. This
will not work. The tools, such as the one calling the rpmdb in the
function that failed, make assumptions about a sane state being
present. If it isn't, they have no way of compensating for that.

At the very least you need to reinstall yum. Download the rpm from a
repository and
rpm -ivh <yum package name>
And you should reinstall the fedora-release package also. It is
possible it is setting the version that the rpmdb function is calling
to determine version, the function that failed.

You can also install the package yum-utils and run the utility
package-cleanup --problems
to see if there are any inconsistencies in your package database.

Before, or after, you do that, it might be a good idea to try to make
your rpm environment sane. As root,
cd /var/lib/rpm
rm __db.*
rpm --rebuilddb

This will recreate the rpm databases from scratch based on the
installed packages. It will take a while, depending on the number of
packages you have installed.

Once you reinstall yum, you should be good to go again. Unless you
have made other changes.

Direct manipulation of files should only be done in the /usr/local
hierarchy or your home environment. It *can* be done with system files,
but you have to make sure you are aware of all the side effects.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 06:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org