Hi I had this problem on the raspberry pi B+ with wheezy OS version. Since nothing worked out I decided to update the OS by changing the ppas from Wheezy to Stretch.
It updated partially but it did not completed it: some packages remain to be upgraded, dist-upgraded or removed. However if I try any apt
command I get the following error:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
So I try to run sudo dpkg --configure -a
but first it hangs on here:
setting up apache2 (2.4.10-10+deb8u11) ...
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
insserv: warning: current start runlevel(s) (empty) of script `apache2' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache2' overrides LSB defaults (0 1 6).
So I interrupted it with CTRL+C. After that it hangs on here
subprocess installed post-installation script was interrupted
Setting up python-support (1.0.15) ...
Setting up nfs-common (1:1.2.8-9) ...
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
insserv: warning: current start runlevel(s) (empty) of script `nfs-common' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6 S) of script `nfs-common' overrides LSB defaults (0 1 6).
I again interrupt it and finally it hangs on here:
subprocess installed post-installation script was interrupted
Setting up udisks2 (2.1.3-5) ...
How can I complete the upgrade?