Find the answer to your Linux question:
Results 1 to 5 of 5
I was trying to add a repository to yum so I could install git and nginx and I ran an update that the website told me to and it broke ...
  1. #1
    Just Joined!
    Join Date
    Jun 2004
    Posts
    8

    Help with yum.

    I was trying to add a repository to yum so I could install git and nginx and I ran an update that the website told me to and it broke yum. I think it has to do with the update to python. I have python 2.3 and python 2.4. Now when I try to install YUM I get the following errors:

    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 comps
    File "/usr/lib/python2.4/site-packages/yum/comps.py", line 22
    import cElementTree
    ^
    IndentationError: expected an indented block


    I am desperate to get this working. I can't even find the newest RPM for YUM to try to install that. Someone please help me out.

    Thanks:

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Which version of RHEL or Fedora are you using?
    Try executing this
    Code:
    su -c 'yum clean all'
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Jun 2004
    Posts
    8
    when I try to run "yum clean all" I get the same error:
    File "/usr/bin/yum", line 4, in ?
    import yum
    File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 49, in ?
    import comps
    File "/usr/lib/python2.4/site-packages/yum/comps.py", line 22
    import cElementTree


    I am running Linux version 2.6.18-194.32.1.el5 (mockbuild@x86-006.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-4)

    Do you have any other ideas?

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Try to rebuild RPM Database.
    Execute this
    Code:
    su -
    rm -f /var/lib/rpm/__db*
    db_verify /var/lib/rpm/Packages
    rpm --rebuilddb
    yum clean all
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined!
    Join Date
    Jun 2004
    Posts
    8
    I tried that and I get the same results. Any other ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...