I have purged python3.5 and its dependencies on Ubuntu 16.04, wanting to use 3.7 instead. Now, upon logging in, I have no access to anything, not even a terminal. How can I fix this?
Asked
Active
Viewed 32 times
0
pythonis rather critical for many Ubuntu tools (including agnome-terminal), so I'd login to a text terminal and reverse whatever you did. You'll find many auto tools (apt,apt-get) may not work until python3 is restored to normal, butdpkgand like core tools will still work so it'll be more manual. Reversing your changes is easiest, be it restore a backup, or using history &aptlogs, but as we don't know what you did, you'll have the best clue. – guiverc Dec 10 '20 at 23:28python -V; python3 -Vto report correct values for your release. Once you'vepython3-minimalinstalled again (as long as it's not interfered with by any changes you made), the rest will be easy. Text terminals are not impacted by python changes (unless you've added python specific commands in login scripts). – guiverc Dec 10 '20 at 23:31python3-minimal(minimum subset required). You'll have to avoid any tools that need python (ie. GUI,apt& like front-end user tools) & stick to basic tools (text terminal,dpkgetc are coded in C, user-geared tools are often python). Download usingwget& usedpkg -ito install given you removed access toapt-getbeing usable I bet.. – guiverc Dec 10 '20 at 23:38apt-get purgewould be reversed byapt-get install, however you need to fix the python issue beforeapt-getwill work... thus using the lower-level tools;apt-getis a front-end for, ie.wget&dpkgas I've already said.. thepython3-minimalis the core package you'll need to get re-installed, then you'll find you can use higher-level tools likeapt-getagain making it easier – guiverc Dec 10 '20 at 23:42