I am running a VM of kali 2020.1 64 bit. When i ran sudo apt-get upgrade i get the following error:
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  php-common python-cffi-backend python3-django python3-dnspython python3-tables-lib
The following packages will be upgraded:
  python-pkg-resources
1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
166 not fully installed or removed.
Need to get 0 B/182 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 301734 files and directories currently installed.)
Preparing to unpack .../python-pkg-resources_44.1.1-1_all.deb ...
ERROR: unknown command "/usr/bin/pyclean"
dpkg: warning: old python-pkg-resources package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
ERROR: unknown command "/usr/bin/pyclean"
dpkg: error processing archive /var/cache/apt/archives/python-pkg-resources_44.1.1-1_all.deb (--unpack):
 new python-pkg-resources package pre-removal script subprocess returned error exit status 1
ERROR: unknown command "/usr/bin/pycompile"
dpkg: error while cleaning up:
 installed python-pkg-resources package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/python-pkg-resources_44.1.1-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have checked that both pycompile and pyclean are in the /usr/bin directory. When i tried to manually unpack the python-pkg-resources_44.1.1-1_all.deb file using sudo gdebi python-pkg-resources_44.1.1-1_all.deb i still got errors:
Code:
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
Requires the installation of the following packages: python-pkg-resources 

Package Discovery and Resource Access using pkg_resources
 The pkg_resources module provides an API for Python libraries to                                                                                                                                            
 access their resource files, and for extensible applications and                                                                                                                                            
 frameworks to automatically discover plugins.  It also provides                                                                                                                                             
 runtime support for using C extensions that are inside zipfile-format                                                                                                                                       
 eggs, support for merging packages that have separately-distributed                                                                                                                                         
 modules or subpackages, and APIs for managing Python's current                                                                                                                                              
 "working set" of active packages.                                                                                                                                                                           
Do you want to install the software package? [y/N]:y                                                                                                                                                         
/usr/bin/gdebi:113: FutureWarning: Possible nested set at position 1                                                                                                                                         
  c = findall("[[(](\S+)/\S+[])]", msg)[0].lower()                                                                                                                                                           
Fetched 0 B in 0s (0 B/s)                                                                                                                                                                                    
(Reading database ... 301734 files and directories currently installed.)                                                                                                                                     
Preparing to unpack .../python-pkg-resources_44.1.1-1_all.deb ...                                                                                                                                            
ERROR: unknown command "/usr/bin/pyclean"                                                                                                                                                                    
dpkg: warning: old python-pkg-resources package pre-removal script subprocess returned error exit status 1                                                                                                   
dpkg: trying script from the new package instead ...                                                                                                                                                         
ERROR: unknown command "/usr/bin/pyclean"                                                                                                                                                                    
dpkg: error processing archive /var/cache/apt/archives/python-pkg-resources_44.1.1-1_all.deb (--unpack):                                                                                                     
 new python-pkg-resources package pre-removal script subprocess returned error exit status 1                                                                                                                 
ERROR: unknown command "/usr/bin/pycompile"
dpkg: error while cleaning up:
 installed python-pkg-resources package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/python-pkg-resources_44.1.1-1_all.deb
E:Sub-process /usr/bin/dpkg returned an error code (1)
Error during install: 'installArchives() failed'
I have looked around but cannot seem to find a fix for this problem, any help would be appreciated!