[CentOS] yum error "AttributeError: LOCATION_BASE" after 4.5 -> 4.6 upgrade

Tue Dec 25 13:31:22 UTC 2007
Johnny Hughes <johnny at centos.org>

Lorenzo Martínez Rodríguez wrote:
> Joe Klemmer escribió:
>> Hello all,
>>
>>     I am having a problem running yum after doing the 4.6 upgrade.  I
>> did a live update through yum and no problems were encountered. 
>> However, now when I try to run yum (with any commands/options) I get
>> this error right after loading/reading the repo's -
>>
>> eading repository metadata in from local files
>> Traceback (most recent call last):
>>   File "/usr/bin/yum", line 29, in ?
>>     yummain.main(sys.argv[1:])
>>   File "/usr/share/yum-cli/yummain.py", line 102, in main
>>     result, resultmsgs = do()
>>   File "/usr/share/yum-cli/cli.py", line 489, in doCommands
>>     ypl = self.returnPkgLists()
>>   File "/usr/share/yum-cli/cli.py", line 1085, in returnPkgLists
>>     ypl = self.doPackageLists(pkgnarrow=pkgnarrow)
>>   File "__init__.py", line 993, in doPackageLists
>>   File "packageSack.py", line 148, in searchNevra
>>   File "packageSack.py", line 236, in _computeAggregateListResult
>>   File "sqlitesack.py", line 514, in searchNevra
>>   File "sqlitesack.py", line 403, in db2class
>>   File
>> "/var/tmp/python-sqlite-root//usr/lib/python2.3/site-packages/sqlite/main.py",
>> line 97, in __getattr__
>> AttributeError: LOCATION_BASE
>>
>>     Running "yum clean all" seems to work but the error does not go away.
>>
>>     I know less than nothing about python so that doesn't help.  I
>> also did a search through the list archives and on Google but couldn't
>> come up with anything (OC, I may not have been asking the right
>> questions).  The server has a bad optical drive so I can't boot into
>> the rescue CD (yet, I've got a replacement coming).  Whenever it gets
>> here I'll be updating to 5.1 but in the mean time there's some
>> security fixes that have come down the pipe which I can't update to
>> due to yum being petulant.
>>
>>     If anyone can shed some light on this or point me in the right
>> direction to get this fixed it would be greatly appreciated.
>>
>> Thank you,
>> Joe
>>
> 
> Hello Joe,
> 
> I had exactly the same problem. I guess that the problem is the yum
> version upgraded. To solve it I searched for an older yum version. I
> found this one: yum-2.4.3-4.el4.centos.noarch. And at least it works.

That is the LATEST yum for centos-4 ... where did you get a NEWER one
that???

Where ever you got it from, that is what broke your system.

> 
> Hope it helps
> 

Hmmm ... not sure what is happening, but this command could help (all
one line):

rpm -q yum yum-metadata-parser sqlite python-sqlite python-urlgrabber
python-elementtree python

The results should be:

yum-2.4.3-4.el4.centos
yum-metadata-parser-1.0-8.el4.centos
sqlite-3.3.6-2
python-sqlite-1.1.7-1.2.1
python-urlgrabber-2.9.8-2
python-elementtree-1.2.6-5.el4.centos
python-2.3.4-14.4.el4_6.1

You can manually download and install any of those that are missing from:

http://mirror.centos.org/centos/4/os/

OR

http://mirror.centos.org/centos/4/updates/

Thanks,
Johnny Hughes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20071225/f1c62764/attachment-0005.sig>