1

I accidentally deleted python3 on Ubuntu from /usr/bin. Now every time i install python it gets installed in /usr/local/bin instead so i took python3.5 and placed it in /usr/bin and created a symlink for it from python3 as it was in the original. Somehow this doesn't work and I do not know what to do anymore.

     sudo apt-get install *anything* returns 

     dpkg : error processing package python3 (--configure)
            Errors encountered while processing 
            python3
            python3-distupgrade
            ubuntu-release-upgrade-core
            ubuntu-release-upgrade-gtk

As a result even terminal doesn't work so have to use xterm.

My /usr/bin looks as below - it looks good so I don't know what is wrong

         ls -l *python 

in /usr/bin returns

         python -> python2.7
         python2 -> python2.7
         python2.7
         python3 
         python3 -> python3.5
         python3.5 

and some symlinks to config files.

           dpkg -l 

reveals Python in pFR state. Which I read as purge, failed, reinstall. Just not sure how to do this?

  • similar question: https://stackoverflow.com/questions/41777987/python-3-5-broken-my-apt – hiro protagonist Jan 27 '17 at 08:50
  • 1
    How this is related with "linux-kernel"? If not, why do you use this tag? If your distro is Ubuntu, why "debian" tag? –  Jan 27 '17 at 08:51
  • sudo apt install -f gives same error. sudo apt install --reinstall python python-minimal looks for command-not-found within /usr/lib which is a python program so it crashes. –  Jan 27 '17 at 08:55

0 Answers0