For some reason I am having trouble upgrading and updating with apt-get:
rob@linux0:~$ sudo apt-get upgrade
[sudo] password for rob:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
libgl1-mesa-dri libxatracker2 linux-generic linux-generic-hwe-18.04 linux-headers-generic
linux-headers-generic-hwe-18.04 linux-image-generic linux-image-generic-hwe-18.04 mesa-va-drivers mesa-vdpau-drivers
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
4 not fully installed or removed.
Need to get 0 B/1,926 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package python-samba (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of samba-common-bin:
samba-common-bin depends on python-samba; however:
Package python-samba is not configured yet.
So I tried: `sudo dpkg --configure -a`
and it returned:
dpkg: error processing package python-samba (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
python-samba
So I tried `sudo apt-get remove -y python-samba`
and it returned:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-ldb python-tdb
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
libnss-winbind python-samba samba-common-bin winbind
0 upgraded, 0 newly installed, 4 to remove and 10 not upgraded.
4 not fully installed or removed.
After this operation, 18.3 MB disk space will be freed.
(Reading database ... 255157 files and directories currently installed.)
Removing libnss-winbind:amd64 (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) ...
Removing winbind (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) ...
Removing samba-common-bin (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) ...
dpkg: error processing package python-samba (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
python-samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
It failed but I figured I would try to install again anyhow with `sudo apt-get install -y python-samba`
and it returned:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-samba is already the newest version (2:4.7.6+dfsg~ubuntu-0ubuntu2.15).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,926 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package python-samba (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
python-samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
I then tried to force an upgrade `sudo apt-get upgrade -f`
and it returned:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
libgl1-mesa-dri libxatracker2 linux-generic linux-generic-hwe-18.04 linux-headers-generic
linux-headers-generic-hwe-18.04 linux-image-generic linux-image-generic-hwe-18.04 mesa-va-drivers mesa-vdpau-drivers
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,926 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package python-samba (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
python-samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
So I tried to force install python-samba and it gave me the same error. I am not sure what to do here.