can't run apt commands because apport/python are corrupt

Bug #1791157 reported by tom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
New
Undecided
Unassigned

Bug Description

Running update/upgrade/autoremove

Running apt install --reinstall *

Running apt install *

Running apt remove *

All yield very similar errors to this. This one in particular is sudo apt install python.

Preparing to unpack .../apport_2.20.9-0ubuntu7.3_all.deb ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: warning: old apport package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
Failed to stop apport-autoreport.path: Unit apport-autoreport.path not loaded.
Failed to stop apport-autoreport.service: Unit apport-autoreport.service not loaded.
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing archive /var/cache/apt/archives/apport_2.20.9-0ubuntu7.3_all.deb (--unpack):
 new apport package pre-removal script subprocess returned error exit status 1
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error while cleaning up:
 installed apport package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/apport_2.20.9-0ubuntu7.3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
tom (tombuntus) wrote :

Tried exporting $PYTHONHOME to a couple different ideas, my $PATH looks good. I have no ideas. Every other related bug's remedy does nothing. Gonna reinstall with 18.10 out of frustration if nobody comments tomorrow (Monday).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.