The Linux Community Forum

Tech Zone => Linux Solutions => Topic started by: kntiinfk on July 21, 2015, 08:34:54 am

Title: yum is not working throwing error
Post by: kntiinfk 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..

[[email protected] 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
[[email protected] bin]#
Title: Re: yum is not working throwing error
Post by: chemicalfan 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 :(
Title: Re: yum is not working throwing error
Post by: Mark Greaves (PCNetSpec) 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 ;) )
Title: Re: yum is not working throwing error
Post by: chemicalfan on July 22, 2015, 01:38:20 pm
What's the rpm equivalent of dpkg?
Title: Re: yum is not working throwing error
Post by: Mark Greaves (PCNetSpec) on July 22, 2015, 02:48:04 pm
Erm .. rpm :)
http://linux.die.net/man/8/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.

--
SimplePortal 2.3.3 © 2008-2010, SimplePortal