English
Ask Your Question
1

Dnf , broken after Purging python3/site_packages

asked 2017-02-17 13:23:54 +0000

aswinmohanme gravatar image

Hey , there I am a Newbie to Fedora ( you can judge by the stupidity of the question) . While Installing a python library I and playing around with pip I ran

sudo rm -rf /usr/lib/python3.5/site-packages/

And now when I run dnf

Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.5/site-packages/dnf/__init__.py", line 31, in <module>
    import dnf.base
  File "/usr/lib/python3.5/site-packages/dnf/base.py", line 37, in <module>
    import dnf.conf
  File "/usr/lib/python3.5/site-packages/dnf/conf/__init__.py", line 43, in <module>
    import dnf.yum.config
  File "/usr/lib/python3.5/site-packages/dnf/yum/config.py", line 28, in <module>
    from iniparse.compat import ParsingError, RawConfigParser as ConfigParser
  File "/usr/lib/python3.5/site-packages/iniparse/__init__.py", line 6, in <module>
    from ini import INIConfig, change_comment_syntax
ImportError: No module named 'ini'

How do I fix this. I got yum-deprecated working , so I can install packages.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-02-18 11:10:11 +0000

You shouldn't delete files in system directories manually as you did, but I assume you now learned that. =0)

A save way to get the files again, would be to reinstall the packages that are installed on your system, provided that yum is working. So you could reinstall all packages with the following command.

yum reinstall $(rpm -qa | tr '\n' ' ')
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

Follow
1 follower

Stats

Asked: 2017-02-17 13:23:54 +0000

Seen: 196 times

Last updated: Feb 18