YUM (apt-get rpm) broken - don't know how to fix

Discussion in 'Linux' started by mikeyd, Jan 10, 2009.

  1. mikeyd

    mikeyd

    Joined:
    Jul 26, 2008
    Messages:
    6
    Likes Received:
    0
    Hi,

    My YUM is broken and I don't know what I need to do to fix it. Basically, whenever I execute a yum command, I get the usual connection refused error message and then a solid cursor on the line underneath it. In that terminal window, I then have no ability to execute anymore commands. Also, the original yum command doesn't seem to have actually done anything, so I really don't know how to fix it!

    EDIT: Have also found out that apt-get and rpm seem to work in the same way. That is, I get a connection refused error and then it moves down one more line where the only character is the cursor. No path or anything. I can type, but commands won't execute. It's as if it is just hanging there.

    Can someone help?

    Thanks.
     
    mikeyd, Jan 10, 2009
    #1
    1. Advertisements

  2. mikeyd

    RockDoctor

    Joined:
    Aug 21, 2008
    Messages:
    963
    Likes Received:
    0
    Location:
    Minnesota, USA
    It is just hanging, the question is, where? My guess is that it's the rpm command (not yum or apt-get). Does rpm work when referencing local files (something like: rpm -q bash)? If not, it's an rpm problem. You might try rebuilding the rpm database (search the forum, it's been mentioned before)
     
    RockDoctor, Jan 12, 2009
    #2
    1. Advertisements

  3. mikeyd

    mikeyd

    Joined:
    Jul 26, 2008
    Messages:
    6
    Likes Received:
    0
    Thanks for the response. rpm -q bash seems to work as it spits out bash-3.2-18.fc8

    As a side note, the update manager is able to download updates but hangs when trying to install them.
     
    mikeyd, Jan 13, 2009
    #3
  4. mikeyd

    RockDoctor

    Joined:
    Aug 21, 2008
    Messages:
    963
    Likes Received:
    0
    Location:
    Minnesota, USA
    Since you've got the updates downloaded, just find the directory where the update manager has cached them (sorry, I don't use the update manager so I have no idea where that is) and then
    Code:
    rpm -Uvh *.rpm
    .
     
    RockDoctor, Jan 13, 2009
    #4
  5. mikeyd

    mikeyd

    Joined:
    Jul 26, 2008
    Messages:
    6
    Likes Received:
    0
    I've been able to install most of the updates by double clicking on the sh files in the cache directory as they don't come in rpm format. As for running commands in the terminal window, it seems that some other commands I used to be able to execute also fail such as the vodafone mobile connect application. Very strange behaviour and I have absolutely no idea why it is happening.
     
    mikeyd, Jan 14, 2009
    #5
  6. mikeyd

    mikeyd

    Joined:
    Jul 26, 2008
    Messages:
    6
    Likes Received:
    0
    I just found another thing which could explain what is happening. When I type xterm in the terminal window, it opens another terminal window as expected. However, whilst that xterm window is open, the original terminal window appears to hang just like when I run a yum command etc.

    So because I have have had to close a few terminal windows down and so forth, I found that there were about 6 instances of bash run when looking at the system monitor. In fact, I've closed those down now because about 4 of them related to one of the updates that has been failing to install. I'll continue pursue with this and see where it leads.
     
    mikeyd, Jan 14, 2009
    #6
  7. mikeyd

    RockDoctor

    Joined:
    Aug 21, 2008
    Messages:
    963
    Likes Received:
    0
    Location:
    Minnesota, USA
    When you type xterm in a terminal window, the terminal window hangs because xterm is running in the foreground and there is no background task. If you type:
    Code:
     xterm & 
    from the terminal window, then both the original terminal and the xterm window will be usable (but if you close the original terminal window, the xterm will die too)
     
    RockDoctor, Jan 14, 2009
    #7
  8. mikeyd

    mikeyd

    Joined:
    Jul 26, 2008
    Messages:
    6
    Likes Received:
    0
    Thanks. That commands works well and I've learnt yet another thing. However, the original issue with yum still remains. I can type yum and get the help screen up and even get the version command to run. However, whenever it requires me to be root and I then precede the command with sudo, it hangs. Perhaps there is something more sinister with how commands are being executed. Although sudo xterm & works fine without hanging.
     
    mikeyd, Jan 14, 2009
    #8
  9. mikeyd

    RockDoctor

    Joined:
    Aug 21, 2008
    Messages:
    963
    Likes Received:
    0
    Location:
    Minnesota, USA
    Very odd. You might try the code below, which will give you the full root environment (the way you were doing it before gave you root privileges, but the environment in which you operated was that of your user).
    Code:
    sudo su -
    yum install <whatever>
     
    RockDoctor, Jan 15, 2009
    #9
  10. mikeyd

    mikeyd

    Joined:
    Jul 26, 2008
    Messages:
    6
    Likes Received:
    0
    No, that code doesn't work. However, when I run yum search <whatever> in non-root mode I get a strange message.

    Error: Cannot access repository dir //var/cache/yum/fedora

    In fact, there is nothing even in the yum directory let alone there being a fedora directory! Something is seriously messed up.
     
    mikeyd, Jan 15, 2009
    #10
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.