0

This could be construed as a 'repeat' question but believe me I have tried everything i've seen bar reset the entire server. I am trying very hard to get a virtualenv working for flask so naturally it needs to be installed / used. However pip says I don't have access to it(as root or --user), python3 never seems to exist to be honest I think I would most benefit from just resetting the python to default with the 2.7 and 3.6. But alas that doesn't seem to be an option, so before I restart the server I thought I would ask here. The following is the list of packages that are errors.

Errors were encountered while processing:
 fail2ban
 ufw
 byobu
 landscape-common
 language-selector-common
 sosreport
 iotop
 dh-python
 salt-common
 ssh-import-id
 cloud-init
 software-properties-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

here are some examples (but by no means all, genuinely comes up for everything relevant to python) of what flags up the message :

sudo dpkg --configure -a

sudo apt-get install -f

sudo apt autoremove

As mentioned before I feel like i've exhausted my options, I feel ive tried everything on the internet unless ive been looking in the wrong places.

Any and all help is very much appreciated, been at this for hours, head is banging :P

EDIT 1:

After entering

sudo dpkg --configure -a

I got the error :

dpkg: dependency problems prevent configuration of salt-minion:
 salt-minion depends on salt-common (= 3002.2+ds-1); however:
  Package salt-common is not configured yet.

dpkg: error processing package salt-minion (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: fail2ban ufw byobu landscape-common language-selector-common sosreport iotop dh-python salt-common ssh-import-id cloud-init salt-minion

With the dependency problem repeated for all packaged listed, with some lke fail2ban stating they are in "a very inconsistent state"

1 Answers1

0

Looks like there's a problem with the package installer on your system. This sort of thing can happen from a failed software installation, or if the installer itself becomes corrupted. Depending on how dpkg broke, there are a few ways to fix it.

Based on how often you're seeing the message, start by reconfiguring the packages that have been unpacked and potentially not installed. An interruption at the wrong time can cause the database to become corrupt:

sudo dpkg --configure -a 

If this does not resolve the issue, update your question to include the error message(s) so that a better solution can be offered