Home > How to, Linux > yum update – TypeError: unsubscriptable object

yum update – TypeError: unsubscriptable object

GD Star Rating
loading...

This morning when I was in the process of updating a few of my virtual machines, based on CentOS 5.3, I’e faced the error which gives the title to the post, basically when I launched the command :

  yum upgrade

I received the following output (which was snipped for brevity) :

Traceback (most recent call last):File "/usr/bin/yum", line 29, in ?for pkg in self.searchFiles(name, strict=True):File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 43, in newFuncreturn func(*args, **kwargs)File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 586, in searchFilesself._sql_pkgKey2po(rep, cur, pkgs)po = self.pc(repo, cur.fetchone())File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 68, in __init__self._read_db_obj(db_obj)File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 94, in _read_db_objsetattr(self, item, _share_data(db_obj[item]))TypeError: unsubscriptable object

After some googling I’ve even found out a bug on CentOS but tracker which pointed me out the right direction. This error will appear when metadata in yum/pirut system gets corrupted even if, per developer’s words, they’re still not sure what’s causing this issue. Keep in mind that if you’re using Yum Extender you won’t get the full error but simply it will not work anyhow to resolve this issue follow these simple steps, open a terminal window and issue the following command : pre id="terminal" user="Lethe" computer="ccielogs"> yum clean metadata: Followed by the command :

  yum clean all

I’m not sure but I think this is the same bug described and marked as corrected here for Red Hat Enterpise Linux 5 even if I’ve noticed CentOS still did not updated the yum-metadata-parser pacakge to version 1.1.2-3 as shown in the ouput of the command :

 rpm -q yum-metadata-parseryum-metadata-parser-1.1.2-2.el5

Well at least we have a solution to it and personally does not but me at all launch one or two additional commands to have this resolved while we wait for the updated package. I hope you’ve found this informative, please feel free to write me or leave a comment for any inconvenience and if you like the artcile feel free to share it with other people sending it via email (link above the post) or using the buttons (below the post) to digg it or share via various systems!

Cheer Lethe.

GD Star Rating
loading...
GD Star Rating
loading...
Related Posts with Thumbnails
Print
Categories: How to, Linux
  1. No comments yet.
  1. No trackbacks yet.
CommentLuv Enabled

 

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
This site is protected by WP-CopyRightPro