1

I removed Python 3 from my computer now I don't have a desktop (posting this from work PC). I can only access the terminal via Ctrl+Alt+F1. I've tried just about everything I've seen on the forums, but

sudo apt-get update

results in a lot of:

W: Failed to fetch http://repo.org/dists/.... Could not resolve repo.org

I'm worried about losing some critical work, so I tried to push one of my Git repos to my Github account via the terminal and I get:

Could not resolve Github.com

Even

ping google.com

returns the Could not resolve error. So, first, how can save my files somehow? Either by pushing them to the Github repo or transferring them to another PC?

  • 1
    It is weird that python 'broke' name resolution as well as other stuff. Just copy entire directory to a thumb drive after tarring it, then elsewhere you can use same git command, easier with https if you don't want to manage the keys. Use this to tar and compress tar caf mybackup.tar.gz /path/to/my-project –  Aug 12 '16 at 06:08
  • 2
    @sdkks Removing Python 3 from Ubuntu generally removes a ton of other packages, which OP presumably did. It is not surprising many things break, including apt-get. I agree tarring the repo is probably the easiest way to backup it. – edwinksl Aug 12 '16 at 06:28
  • Good to know python can be killer for ubuntu :) –  Aug 12 '16 at 06:43
  • I can't answer because I'm not good in configuring Internet connections from terminal either (unless you're using router, in which case simple configuration of LAN is enough), but the solution boils down to configuring network from terminal using ip utility, then internet connection, with installing along the needed for Internet packages with dpkg, i.e. you first have to download them. To download them, or to read tutorials/docs you can use LiveCD of Ubuntu. – Hi-Angel Aug 12 '16 at 06:48
  • 1
    It's totally possible to recover if you removed Python from Ubuntu, but unless you know what you're doing it's probably easier to just re-install Ubuntu. – David Foerster Aug 12 '16 at 08:58
  • Yep, I've copied any files that I really wanted, moved them to a flash drive, and now I'm just going to reinstall Ubuntu. Not really ideal, but it will do. Thanks guys. – Ryan Erwin Aug 13 '16 at 02:45
  • @RyanErwin Yeah, it is possible to recover like DavidFoerster said, but from various questions on this site related to yours that I have encountered, it simply takes too much time. Reinstalling is going to be faster. – edwinksl Aug 13 '16 at 14:05

1 Answers1

0

Lots of applications and sometimes even the desktop and window manager need python 3, so why did you remove it? didnt you see what it was going to delete? (it is like everything!) .. You just probably need to re install and maybe plug you disk into a external usb to backup your data if you are lucky but if you want to recover without re install you will need to bee extremely tech savvy.

(You maybe want to buy a fitting disk to usb connector and copy your critical work. (NOTE: BUY THE ONE FOR YOUR DEVICE AND PLEASE MAKE SURE YOUR PC YOU ARE COPYING TO SUPPORTS EXT4 AND SIMILAIR!))

Yoran Jansen
  • 1,066
  • 2
  • 14
  • 28