python purge oh crap

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
danneauxs

python purge oh crap

Post by danneauxs »

Ok, ran this command "sudo apt purge -f python3" while trying to fix a problem. Not the first time following advice on a forum caused me problems. I was trying to install rhythmbox on my mint 17.3 system. Go some message about expecting python 3.* but bot 3.* or some such. That's basically why I tried the purge (after hours of futzing around.

Well, a day or two goes by and I try to add a ppa so I can install a program and I get this message:
Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1387, in <module>
codename = config_parser.get("general", "base_codename")
File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'

I then tried to open software sources from the menu and a window popped up asking for my password as usual. After entering it and clicking OK the window closed but nothing happened. Tried several times but nothing after the password. Rebooted and same thing.

python3 --version gives 3.5.2
python --version gives 2.7.6

apt policy python3-gi (not sure what this is but these 3 commands where in part of my thread search which was long confusing and convoluted.)
python3-gi:
Installed: (none)
Candidate: 3.12.0-1ubuntu1
Version table:
3.12.0-1ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
100 /var/lib/dpkg/status
3.12.0-1 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
I can open software manager and update (which I ran so I am up to date) and synaptic package manager.

Not sure what other information to give.

Thanks in advance.

Danneauxs
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
WharfRat

Re: python purge oh crap

Post by WharfRat »

The quickest way to recover from this is to reinstall.

You purged most of your critical system components.

I did a simulated apt purge -f python3 and this is what it would do

Code: Select all

The following packages will be REMOVED:
  apt-clone* apt-xapian-index* aptdaemon* apturl* apturl-common* byobu*
  caja-gksu* command-not-found* compiz* compiz-gnome* dh-python* firefox*
  foomatic-db-compressed-ppds* gconf2* gdebi* gdebi-core* gimp-help-en*
  gir1.2-ibus-1.0* gir1.2-xapp-1.0* gir1.2-xplayer-1.0* gksu* gnome-orca*
  google-earth-pro-stable* gstreamer0.10-gconf* gstreamer0.10-gnomevfs* gufw*
  hplip* hplip-data* hplip-gui* libgksu2-0* libgnomevfs2-0*
  libgnomevfs2-common* libpurple-bin* libxapp1* libxplayer0* lsb-core*
  lsb-release* mdm* mint-artwork-common* mint-artwork-gnome* mint-common*
  mint-meta-core* mint-meta-mate* mintbackup* mintdesktop* mintdrivers*
  mintinstall* mintlocale* mintmenu* mintnanny* mintsources* mintstick*
  mintsystem* mintupdate* mintwelcome* openprinting-ppds* pix*
  plymouth-theme-ubuntu-text* printer-driver-foo2zjs*
  printer-driver-foo2zjs-common* printer-driver-postscript-hp*
  printer-driver-ptouch* printer-driver-pxljr* python3* python3-apt*
  python3-aptdaemon* python3-aptdaemon.gtk3widgets*
  python3-aptdaemon.pkcompat* python3-blinker* python3-brlapi* python3-cairo*
  python3-cffi-backend* python3-chardet* python3-commandnotfound*
  python3-configobj* python3-crypto* python3-cryptography* python3-cups*
  python3-cupshelpers* python3-dbus* python3-dbus.mainloop.qt* python3-debian*
  python3-defer* python3-dirspec* python3-gdbm* python3-gi* python3-gi-cairo*
  python3-httplib2* python3-icu* python3-idna* python3-jwt* python3-louis*
  python3-lxml* python3-newt* python3-oauthlib* python3-oneconf*
  python3-pexpect* python3-pil* python3-piston-mini-client*
  python3-pkg-resources* python3-psutil* python3-ptyprocess* python3-pyasn1*
  python3-pyatspi* python3-pycurl* python3-pyqt4* python3-reportlab*
  python3-reportlab-accel* python3-requests* python3-setproctitle*
  python3-sip* python3-six* python3-speechd* python3-uno* python3-urllib3*
  python3-virtkey* python3-xapian1.3* python3-xapp* python3-xdg* python3-xkit*
  sessioninstaller* sosreport* synaptic* system-config-printer-common*
  system-config-printer-gnome* system-config-printer-udev* terminator*
  thin-client-config-agent* tomboy* ubuntu-drivers-common* ubuntu-minimal*
  ubuntu-system-adjustments* ubuntu-system-service* ufw* unattended-upgrades*
  virtualbox* virtualbox-ext-pack* virtualbox-qt* xapps-common* xed* xplayer*
  xplayer-plugins* xplayer-plugins-extra* xviewer* xviewer-plugins*
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  mintsources synaptic (due to mintsources) lsb-release (due to mintsources)
  python3 (due to mintsources) python3-xapp (due to mintsources)
0 upgraded, 0 newly installed, 145 to remove and 0 not upgraded.
Note the warning message toward the end.

Chalk this up to a learning experience :wink:
danneauxs

Re: python purge oh crap

Post by danneauxs »

thanks, that's what I was afraid of. Live and learn right.


Danneauxs
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: python purge oh crap

Post by Hoser Rob »

danneauxs wrote: Sat May 26, 2018 7:05 am ... that's what I was afraid of. ...
I think reinstallling was suggested because trying to fix it would be a LOT scarier if you're relatively new to this. It's a pretty standard recommendation. I's suggest reinstalling with a separate /home partition if possible (if you aren't already doing so), it makes future reinstallation a hell of a lot easier.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
danneauxs

Re: python purge oh crap

Post by danneauxs »

Going for the reinstall option. Couple of questions. I've seen a few articles on reinstalling but retaining all your files, programs etc using the backup feature and installing "along" without formatting the partition. Does this work and would it solve my problems if it does work? I'm going to backup my entire install to a separate drive just in case I need files from it. I'm assuming if this is possible I'd have to install the exact same version (ie 17.2 mint I'm running now.

thanks
Danneauxs
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: python purge oh crap

Post by AndyMH »

I'm thinking that IF you create the space you MIGHT be able to do that. Boot from a live USB or DVD, run GPARTED and see if you can shrink whatever partitions you've got to create enough space, then install mint into that space (do something else in the installation menu). For starters if you can free up 20G for root (might get away with less, 15G??) and anything left over for /home in a separate partition - follow Rob Hoser's advice, it's good. Once up and running, mount your old partitions and copy over your old home (maybe plug in a USB HDD if short of disk space). If you get that far, you can then delete the old partitions and resize the new ones to use the space (GPARTED again).

No reason why you shouldn't install the latest version, 18.3. If 17.2 worked then 18.3 probably will and is probably a better choice.

And, once you are up and running, install a decent backup regime - look at timeshift, backintime, aptik, redo, clonezilla. And there are others. Different tools for different purposes. I've borked my system more than once and have been saved by my backups.

I used to think that dd was one of the most dangerous utilities around, I've learn't something new :)
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
danneauxs

Re: python purge oh crap

Post by danneauxs »

I'm going to go for it.

I use to back up constantly in windows. I'll look more into it.

Thanks
Locked

Return to “Software & Applications”