« もしPowerEdge SC1435が | メイン | up 797 days »
2009年4月28日
TypeError: unsubscriptable object
カテゴリ:CentOSなんかCentOS5.3でyum updateすると
TypeError: unsubscriptable object
とか表示されてyum update出来ない。って奴は、次のコマンドで救われます。
yum clean metadata
分かるような分からないような感じ。まー、なんかの拍子にmetadataがぶっ壊れたのをcleanしてるのでしょうか。次に「yum update」すると、何事もなかったかのようにupdateが進行します。
で、manしてみた
yum clean metadata
Eliminate all of the files which yum uses to determine the
remote availability of packages. Using this option will force
yum to download all the metadata the next time it is run.
まー、そのままだよね。なんか、リモートのパッケージ情報がらみをクリアするって書いてあるしなぁ。これ使うと次にyumを走らせたときに、metadataを全部取ってくるとか。やっぱ、metadataが壊れちゃったんでしょう、何かの拍子に。
ちなみに、エラーメッセージ全容はこんな感じ。
---> Package xulrunner.x86_64 0:1.9.0.9-1.el5 set to be updated
filelists.xml.gz | 848 kB 00:01
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 145, in main
(result, resultmsgs) = base.buildTransaction()
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 647, in buildTransaction
(rescode, restring) = self.resolveDeps()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 704, in resolveDeps
for po, dep in self._checkFileRequires():
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 939, in _checkFileRequires
if not self.tsInfo.getOldProvides(filename) and not self.tsInfo.getNewProvides(filename):
File "/usr/lib/python2.4/site-packages/yum/transactioninfo.py", line 414, in getNewProvides
for pkg, hits in self.pkgSack.getProvides(name, flag, version).iteritems():
File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 300, in getProvides
return self._computeAggregateDictResult("getProvides", name, flags, version)
File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 470, in _computeAggregateDictResult
sackResult = apply(method, args)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 861, in getProvides
return self._search("provides", name, flags, version)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 43, in newFunc
return func(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 837, in _search
for pkg in self.searchFiles(name, strict=True):
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 43, in newFunc
return func(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 586, in searchFiles
self._sql_pkgKey2po(rep, cur, pkgs)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 470, in _sql_pkgKey2po
pkg = self._packageByKey(repo, ob['pkgKey'])
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 413, in _packageByKey
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_obj
setattr(self, item, _share_data(db_obj[item]))
TypeError: unsubscriptable object
投稿者 ymkx : 2009年4月28日 19:19 |