Author Topic: yum is not working throwing error  (Read 4514 times)

0 Members and 1 Guest are viewing this topic.

Offline kntiinfk

  • Jr. Member
  • **
  • Posts: 1
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
yum is not working throwing error
« on: July 21, 2015, 08:34:54 am »
Hi,

when i do yum update on fedora 21 i get the following error and i am not able to run any of the packages with yum..

This problem started when i upgraded python to 3.4.3.. later i reverted back to 2.7... Right now i am running python 2.7 but still i am getting the following error..

[root@localhost bin]# yum update
Traceback (most recent call last):
  File "/bin/yum", line 22, in <module>
    import yummain
  File "/usr/share/yum/yummain.py", line 22, in <module>
    import clientStuff
  File "/usr/share/yum/clientStuff.py", line 18, in <module>
    import rpm
ImportError: No module named rpm
[root@localhost bin]#

Offline chemicalfan

  • Hero Member
  • *****
  • Posts: 1166
  • Karma: 36
  • Gender: Male
  • I've been here a little while!
    • View Profile
    • Awards
Re: yum is not working throwing error
« Reply #1 on: July 22, 2015, 11:39:01 am »
Err, Python 2 & 3 aren't compatible - you should have both on your system, otherwise you could have some problems (as a lot of system programs rely on it). How did you remove it - I'd imagine the package manager would have wanted to remove loads of stuff due to dependencies?

If yum is busted, this could be a re-install job :(

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18255
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: yum is not working throwing error
« Reply #2 on: July 22, 2015, 12:47:12 pm »
or you could manually download all the original default rpm's of python and reinstall them.
(good luck .. a reinstall will probably be easier, then don't mess with python which can be a b*tch to fix once you break it ;) )
« Last Edit: July 22, 2015, 12:49:06 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline chemicalfan

  • Hero Member
  • *****
  • Posts: 1166
  • Karma: 36
  • Gender: Male
  • I've been here a little while!
    • View Profile
    • Awards
Re: yum is not working throwing error
« Reply #3 on: July 22, 2015, 01:38:20 pm »
What's the rpm equivalent of dpkg?

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18255
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: yum is not working throwing error
« Reply #4 on: July 22, 2015, 02:48:04 pm »
Erm .. rpm :)
http://linux.die.net/man/8/rpm

so to install:
Code: [Select]
rpm -i <packagename.rpm>
at a root prompt

Same deal as dpkg .. doesn't resolve dependencies.

--
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal