CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - General Support
  yum problem

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  TheOnly92
      TheOnly92
yum problem
#1
Newbie
Joined: 2009/7/5
From
Posts: 7
I had this problem for a long time, just didn't find the proper place to post it. I think here's it.

As far as I can remember, before this error occurred I updated Webmin to 1.480. Not sure if that's the problem though.

Now whenever I run yum, it shows these errors:

[root@theonly ~]# yum
Traceback (most recent call last):
File "/usr/bin/yum", line 4, in ?
import yum
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 49, in ?
import config
File "/usr/lib/python2.4/site-packages/yum/config.py", line 27, in ?
from parser import ConfigPreProcessor
File "/usr/lib/python2.4/site-packages/yum/parser.py", line 3, in ?
import urlgrabber
File "/usr/lib/python2.4/site-packages/urlgrabber/__init__.py", line 53, in ?
from grabber import urlgrab, urlopen, urlread
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 406, in ?
import keepalive
File "/usr/lib/python2.4/site-packages/urlgrabber/keepalive.py", line 339, in ?
class HTTPSHandler(KeepAliveHandler, urllib2.HTTPSHandler):
AttributeError: 'module' object has no attribute 'HTTPSHandler'
[root@theonly ~]#

I don't know anything about python, so can anyone help me?
Posted on: 2009/7/5 7:15
Create PDF from Post Print
Top
  •  WhatsHisName
      WhatsHisName
Re: yum problem
#2
Professional Board Member
Joined: 2005/12/19
From /earth/usa/nj
Posts: 1483
The first thing to try is to cleanup yum (i.e., clean up old packages, headers, metadata & dbcache):

# yum --enablerepo=\* clean all
_________________
Useful links: Newbie Info; Manuals; Wiki; EL Repo
Posted on: 2009/7/5 14:04
Create PDF from Post Print
Top
  •  AlanBartlett
      AlanBartlett
Re: yum problem
#3
Moderator
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 9136
Quote:

The first thing to try is to cleanup yum (i.e., clean up old packages, headers, metadata & dbcache):

# yum --enablerepo=\* clean all

There's just one small issue to be aware of when following WHN's advice -- the wild-card will also enable the c5-media repository. Hence I would advise --

yum --enablerepo=\* --disablerepo=c5-media clean all
_________________
Alan

100% Unix & Linux. Co-founder of the ELRepo Project.
Posted on: 2009/7/5 14:28
Create PDF from Post Print
Top
  •  WhatsHisName
      WhatsHisName
Re: yum problem
#4
Professional Board Member
Joined: 2005/12/19
From /earth/usa/nj
Posts: 1483
The cleanup in post #2 has never caused me a problem, so why is it defective?
_________________
Useful links: Newbie Info; Manuals; Wiki; EL Repo
Posted on: 2009/7/5 16:10
Create PDF from Post Print
Top
  •  toracat
      toracat
Re: yum problem
#5
Moderator
Joined: 2006/9/3
From California, US
Posts: 6921
I can testify that yum complains if --disablerepo=c5-media is omitted in certain cases. I have not investigated yet as to in what cases that happens, but I saw it in the past and I had to add the said option to get the 'yum clean' to work.
_________________
Useful links: Search Forums, Forum FAQ
Posted on: 2009/7/5 16:39
Create PDF from Post Print
Top
  •  TheOnly92
      TheOnly92
Re: yum problem
#6
Newbie
Joined: 2009/7/5
From
Posts: 7
Nope, still no luck. It gives the same error. (exactly)
Posted on: 2009/7/6 8:21
Create PDF from Post Print
Top
  •  glennzo
      glennzo
Re: yum problem
#7
Peeking in the Member Window
Joined: 2005/3/6
From
Posts: 15
Try this:
yum clean all
rm -f /var/lib/rpm/__db*
rpm --rebuilddb
Now see if yum wants to play nicely again.
_________________
Glenn
Powered by Fedora or CentOS.
Posted on: 2009/7/6 10:43
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: yum problem
#8
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
Not a hardware issue - moving the topic to General.

Seems like a possible problem with python. If the above suggestion does not help, please provide the results of:
rpm -qa yum python\*
rpm -V yum python python-urlgrabber python-elementtree python-iniparse python-sqlite
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2009/7/6 18:22
Create PDF from Post Print
Top
  •  behzadfu
      behzadfu
Re: yum problem
#9
Newbie
Joined: 2009/6/27
From
Posts: 3
I had same error on centos
yum clean has simillar error at post #1
I had fixed this by reinstalling yum

rpm -e yum yum-fastestmirror
rpm -Uvh yum-3.2.19.1.rpm

yum-3.2.19.1.rpm can be downloaded from rpm.pbone.net
Posted on: 2009/7/7 7:28
Create PDF from Post Print
Top
  •  TheOnly92
      TheOnly92
Re: yum problem
#10
Newbie
Joined: 2009/7/5
From
Posts: 7
I tried every method suggested by everyone here, yum still doesn't cooperate :(

[root@theonly ~]# rpm -qa yum python\*
python-2.4.3-24.el5
python-iniparse-0.2.3-4.el5
python-urlgrabber-3.1.0-5.el5
yum-3.2.19-18.el5.centos
python-elementtree-1.2.6-5
python-sqlite-1.1.7-1.2.1

The next command, the output is here: http://paste2.org/p/308288

Reinstalling yum did helped me on another box (CentOS 4) but not on this unfortunately...
Posted on: 2009/7/7 8:24
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: yum problem
#11
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
Your python packages are seriously corrupted. You will have to use rpm to force re-installation of yum dependencies.
# rpm -q --requires yum
/usr/bin/python
config(yum) = 3.2.19-18.el5.centos
python >= 2.4
python(abi) = 2.4
python-elementtree
python-iniparse
python-sqlite
rpm >= 0:4.4.2
rpm-python
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
urlgrabber >= 3.1.0
yum-fastestmirror
yum-metadata-parser >= 1.1.0


I'd start by downloading the latest versions of all the following RPMs into a working directory:
python python-urlgrabber python-elementtree python-iniparse python-sqlite

then
rpm -Uvh --force *
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2009/7/7 11:01
Create PDF from Post Print
Top
  •  TheOnly92
      TheOnly92
Re: yum problem
#12
Newbie
Joined: 2009/7/5
From
Posts: 7
Nope, did force reinstall the first time, still didn't work out, then removed those packages, and install, still doesn't work. I just wonder do I need to reboot server after the installation? It's a production server actually...
Posted on: 2009/7/8 9:28
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: yum problem
#13
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
A reboot should not be required for packages like python and yum. Should only be needed for a new kernel or upgrade of core libraries such as glibc.

This does raise the question of how far behind you are. Please show:
rpm -q centos-release glibc kernel
uname -rmi
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2009/7/8 15:59
Create PDF from Post Print
Top
  •  TheOnly92
      TheOnly92
Re: yum problem
#14
Newbie
Joined: 2009/7/5
From
Posts: 7
[root@theonly ~]# rpm -q centos-release glibc kernel
centos-release-5-3.el5.centos.1
glibc-2.5-34
package kernel is not installed
[root@theonly ~]# uname -rmi
2.6.18-92.1.18.el5.028stab060.8ent i686 i386

Not too far behind, I believe? It's a VPS so I think it don't need the kernel package?
Posted on: 2009/7/9 9:15
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: yum problem
#15
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2009/7/9 12:30
Create PDF from Post Print
Top
  •  TheOnly92
      TheOnly92
Re: yum problem
#16
Newbie
Joined: 2009/7/5
From
Posts: 7
So therefore, is there a solution to this problem? Or I will have to rebuild my VPS? Or I will have to consult my host?
Posted on: 2009/7/10 10:14
Create PDF from Post Print
Top
  •  toracat
      toracat
Re: yum problem
#17
Moderator
Joined: 2006/9/3
From California, US
Posts: 6921
Quote:

TheOnly92 wrote:
So therefore, is there a solution to this problem? Or I will have to rebuild my VPS? Or I will have to consult my host?

You have to ask your hoster. Anything we advice here might actually break your system because it is not genuine CentOS.
_________________
Useful links: Search Forums, Forum FAQ
Posted on: 2009/7/10 11:36
Create PDF from Post Print
Top
  •  TheOnly92
      TheOnly92
Re: yum problem
#18
Newbie
Joined: 2009/7/5
From
Posts: 7
Doesn't matter, thanks for all the help you have provided :)

I might come back with questions to genuine CentOS next time.
Posted on: 2009/7/11 6:56
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com