Loading ...
Sorry, an error occurred while loading the content.
 

Re: Help ! yum is not working any more....

Expand Messages
  • Cameron Simpson
    ... That will be because updating yum removed or renewed the .pyc file. .pyc files are cached precompiled versions of .py python modules. They re made on
    Message 1 of 4 , Oct 24, 2007
      On 24Oct2007 16:20, Scott <scottro@...> wrote:
      | On Wed, Oct 24, 2007 at 04:27:10PM +0000, mehdi_adust wrote:
      | > hello everybody ,
      | >
      | > i've installed yum-2.0.3-0.fdr.1.rh90 .in RHEL-4
      | >
      | > & when i'm going to install something with yum..such as
      | >
      | > yum install pidgin..............then error occured...
      | >
      | > "
      | > yum install pidgin
      | > Traceback (most recent call last):
      | > File "/usr/bin/yum", line 22, in ?
      | > import yummain
      | > ImportError: Bad magic number in /usr/share/yum/yummain.pyc
      |
      | Sometimes, this sort of thing can be fixed with
      |
      | yum update yum
      |
      |
      | (Or it might give you the same error that you get with pidgin, however,
      | updating yum has sometimes helped me with this sort of error.)

      That will be because updating yum removed or renewed the .pyc file.
      .pyc files are cached precompiled versions of .py python modules.
      They're made on demand. They are also safe to remove.

      Mehdi, try removing the .pyc file.

      Or rename it:
      mv /usr/share/yum/yummain.pyc /usr/share/yum/yummain.pyc-BAD
      for later inspection.

      Anyway, after removing or renaming the offending file, try your
      yum command again.

      However, a damaged .pyc file may indicate somethig else is broken.
      If no other errors were evident and you hadn't interrupted a yum run earlier
      (which could conceivably leave around a bad .pyc file I suppose) you may have
      a system problem (busted RAM, flakey bus, failing hard drive?)
      --
      Cameron Simpson <cs@...> DoD#743
      http://www.cskk.ezoshosting.com/cs/

      Ed Campbell's <ed@...> pointers for long trips:
      7. Be prepared to have at least 1 flat, 2 electrical problems and a
      broken chain. Maybe a broken clutch cable too. The best prevention
      is to be able to fix it on the spot, only things you can't fix
      will break according to the law.
    • mehdi_adust
      i ve installed yum new .& now there is no BAd magic error.....i ve installed these rpm s ... (RHEL _4 & i386) yum-2.4.2-0.4.el4.rf.noarch.rpm dependencies : 1.
      Message 2 of 4 , Oct 26, 2007
        i've installed yum new .& now there is no BAd magic error.....i've
        installed these rpm's ... (RHEL _4 & i386)

        yum-2.4.2-0.4.el4.rf.noarch.rpm

        dependencies :

        1. python-elementtree-1.2.6-7.el4.rf.i386.rpm
        2. python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
        3. sqlite-2.8.17-1.el4.rf.i386.rpm

        but,,now when i give a command such like........yum update yum
        or , yum install pkg_name ........then i find these........
        "
        [root@localhost ~]# yum update yum
        Setting up Update Process
        Setting up repositories
        No Repositories Available to Set Up
        Reading repository metadata in from local files
        Could not find update match for yum
        No Packages marked for Update/Obsoletion "
        note: everytime i put the rpm(which i'll install) in root folder.


        Now can't understand what to do ...?

        also tell me..what is the purpose of yum ..? is it a automatic
        installer from internet ...? anyone frm grp please help me...come on
      Your message has been successfully submitted and would be delivered to recipients shortly.