Tech Zone > Linux Solutions

yum is not working throwing error

(1/1)

kntiinfk:
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]#

chemicalfan:
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 :(

Mark Greaves (PCNetSpec):
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 ;) )

chemicalfan:
What's the rpm equivalent of dpkg?

Mark Greaves (PCNetSpec):
Erm .. rpm :)
http://linux.die.net/man/8/rpm

so to install:

--- Code: ---
rpm -i <packagename.rpm>
--- End code ---
at a root prompt

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

--

Navigation

[0] Message Index

Go to full version