LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   How to recover from Python disaster (https://www.linuxquestions.org/questions/ubuntu-63/how-to-recover-from-python-disaster-4175596118/)

Nickwit 12-25-2016 08:27 PM

How to recover from Python disaster
 
Hi all


I'm using Ubuntu-Studio for the first time... all was good, apart from bluetooth clashing with wifi (which has been going on for years now, across multiple versions, laptops etc)...

... and (more pertinently), Inkscape not being able to export PLT... which I need for work.

On a thread elsewhere, someone suggested I "try a complete reinstall of Python" - so I did

sudo apt-get remove python2.7

in the hope of then doing

sudo apt-get install python3.5

and it deleted half of the applications completely (including inkscape), and a lot more (eg: Jack) appear to no longer work.


Is there an easy way to recover from this or do I have to reinstall my operating system completely?

AlucardZero 12-25-2016 09:46 PM

If you do not have the list of what was uninstalled, in /var/log there should be several logs of the package activities. None of them are particularly suitable for copying and pasting, but using them you can find out exactly what to reinstall. Use the command line to reinstall everything that was removed and you'll be fine.

/var/log/apt/history.log
/var/log/apt/term.log
/var/log/dpkg.log


Let this be a lesson for you to read and think before pressing Y.

Nickwit 12-25-2016 10:59 PM

Hiya - thanks for that.


There seems to be about 130 packages, most of which I don't recognise... which may or may not be dependencies.

I guess I just re-install the applications I do actually use... which is a pity, because Ubuntu-Studio had included a whole load of stuff I might have found interesting.


I don't know what the lesson is here - with respect, I did "read and think" for about a week - getting nowhere, and then asking on forums. You do kindof depend on forums for help, rather than advice that will wind up trashing your system.

I don't know if it's just me, but I've been using Ubuntu for about 10 years now I think - and it's getting more and more difficult to get working properly each time. It' almost like software gets to a certain level of complexity, and then after that a kind of entropy kicks in.

syg00 12-26-2016 12:30 AM

If they maintain their own repos, package re-install should work and retain any config changes they have merged. Cross-package dependencies they may have introduced - hmmm, maybe.

For a special spin like that a re-install might be a better option. Make sure you have /home as a separate partition first - you can mount that during install and not format it and all you user specific config files will be retained and used on reboot of the new system.
Back when I did use Ubuntu, this worked successfully over a period of years.

Nickwit 12-26-2016 01:32 AM

Yea - it's looking like a new install :)

rknichols 12-26-2016 09:20 AM

Quote:

Originally Posted by Nickwit (Post 5646288)
I don't know what the lesson is here

The lesson is that when apt-get displays a huge list of packages that will be removed, you don't respond "y" without reviewing the list and making sure it doesn't include things you want to keep.

And FYI, python-3 is not backward compatible with python-2. Programs written to work with one will not run with the other. If you want python-3, it can be installed along with python-2. They are different packages, not just different versions of the same package.


All times are GMT -5. The time now is 03:19 AM.