Autore Topic: yum si rotto: TypeError: unsubscriptable object  (Letto 2644 volte)

Offline pinocchio

  • Full Member
  • ***
  • Post: 144
    • Mostra profilo
yum si rotto: TypeError: unsubscriptable object
« il: 28 Maggio 2009, 12:17:38 »
ops..
sono andato ad aggiornare una macchina su cui non ci mettevo le mani da tempo e guardate un po cosa successo:

[root@srv001 ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.halifax.rwth-aachen.de
 * updates: mirror.silyus.net
 * addons: ftp.halifax.rwth-aachen.de
 * extras: ftp.halifax.rwth-aachen.de
Setting up Update Process
Resolving Dependencies
There are unfinished transactions remaining. You mightconsider running yum-complete-transaction first to finish them.
--> Running transaction check
---> Package audit.i386 0:1.7.7-6.el5_3.3 set to be updated
---> Package ipsec-tools.i386 0:0.6.5-13.el5_3.1 set to be updated
---> Package pango.i386 0:1.14.9-5.el5.centos set to be updated
---> Package audit-libs-python.i386 0:1.7.7-6.el5_3.3 set to be updated
---> Package audit-libs.i386 0:1.7.7-6.el5_3.3 set to be updated
---> Package xulrunner.i386 0:1.9.0.10-1.el5 set to be updated
---> Package freetype.i386 0:2.2.1-21.el5_3 set to be updated
---> Package file.i386 0:4.17-15.el5_3.1 set to be updated
---> Package libwmf.i386 0:0.2.8.4-10.2 set to be updated
---> Package kernel.i686 0:2.6.18-128.1.10.el5 set to be installed
---> Package ntp.i386 0:4.2.2p1-9.el5.centos.2 set to be updated
---> Package acpid.i386 0:1.0.4-7.el5_3.1 set to be updated
---> Package kernel-headers.i386 0:2.6.18-128.1.10.el5 set to be updated
---> Package crash.i386 0:4.0-7.2.3.el5.centos.1 set to be updated
---> Package sos.noarch 0:1.7-9.16.el5_3.5 set to be updated
filelists.xml.gz                                                                                           | 1.0 MB     00:02
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


e ora cosa mi consigliate di fare?
grazie

Offline LonelyWolf

  • Moderator
  • Hero Member
  • *****
  • Post: 1396
    • Mostra profilo
    • Traversate dei laghi
Re: yum si rotto: TypeError: unsubscriptable object
« Risposta #1 il: 28 Maggio 2009, 12:24:36 »
Fare come ti consiglia centos yum-complete-transaction non sarebbe una cattiva idea.

Offline pinocchio

  • Full Member
  • ***
  • Post: 144
    • Mostra profilo
Re: yum si rotto: TypeError: unsubscriptable object
« Risposta #2 il: 28 Maggio 2009, 12:30:11 »
uh...  :o

avevo letto pi volte il messaggio ma giuro che non avevo letto quella riga: effetti del panico

e come di fa una yum-complete-transaction?
a quanto pare non un comando riconosciuto..


[root@srv001 ~]# yum-complete-transaction
-bash: yum-complete-transaction: command not found

Offline pinocchio

  • Full Member
  • ***
  • Post: 144
    • Mostra profilo
Re: yum si rotto: TypeError: unsubscriptable object
« Risposta #3 il: 28 Maggio 2009, 12:35:05 »
 ;D

sono proprio un pessimo sistemista se continuo a farmi prendere dal panico
ho risolto grazie :)


per tutti quelli che finiranno su questo post:
la transazione incompleta non preclude l'installazione di nuovi pacchetti e se non lo si fatto prima si deve lanciare un

yum install yum-utils

e quindi procedere come suggerito dal buon LonelyWolf

oggi ho imparato due cose nuove. una buona giornata :)
saluti