LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-12-2009, 12:32 PM   #1
rajesh.bahl
Member
 
Registered: Jan 2007
Posts: 101

Rep: Reputation: 15
Problem with yum


Dear All,

Need your help in resolving an isue:-

I am trying to update from CentOS 5.2 ( x86_64) to CentOS 5.3. When I run the yum command, I get the following output :

[root@lin2 bin]# yum install python*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* rpmforge: apt.sw.be
* base: ftp.iitm.ac.in
* updates: mirrors.hns.net.in
* addons: ftp.iitm.ac.in
* extras: ftp.iitm.ac.in
Setting up Install Process
Parsing package install arguments
No package python2.4 available.
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: python = 2.4.3-21.el5 for package: python-devel
--> Processing Dependency: python = 2.4.3-21.el5 for package: python-devel
---> Package python.x86_64 0:2.4.3-24.el5 set to be updated
--> Running transaction check
---> Package python-devel.x86_64 0:2.4.3-24.el5 set to be updated
---> Package python-devel.i386 0:2.4.3-24.el5 set to be updated
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


After this, the process of updation aborts.
Can any one suggest why is this happening and how to solve the issue ?


Thanking In Advance
rajesh.bahl
 
Old 04-12-2009, 12:51 PM   #2
eth1
Member
 
Registered: May 2008
Posts: 97

Rep: Reputation: 20
Try,

Quote:
yum clean metadata
Shouldn't Python be a part of the OS as YUM IIRC requires Python.

What is the output of,

Quote:
rpm -qa | grep -i python
 
Old 04-13-2009, 04:13 AM   #3
rajesh.bahl
Member
 
Registered: Jan 2007
Posts: 101

Original Poster
Rep: Reputation: 15
The problem got solved !

I found that "yum" rpm was of CentOS 5.3 ( probably updated yum first) while the system was booting from CentOS 5.2 kernel.

Erased 5.3 yum and installed 5.2 yum.

Now seems to be working okay!



rajesh.bahl
 
Old 04-13-2009, 08:15 AM   #4
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

Rep: Reputation: 62
Even though they always tell you to update yum first, doing so can be problematic because of the dependency on python package versions.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Installing Yum: "No module named yum" braclayrab Linux - Newbie 9 08-04-2009 06:57 PM
yum header/pidof yum problem yohmie Fedora 3 03-24-2009 07:54 AM
problem after yum yum yum (delicious) alaios Fedora 3 01-14-2009 02:34 AM
problem doing yum updates and what may be a similar problem installing vlm bad horsie Linux - Newbie 3 12-27-2008 02:51 AM
Yum Problem - /var/cache/yum/base/primary.xml.gz:1 ice99 Linux - Software 0 12-15-2005 01:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration