View Issue Details

IDProjectCategoryView StatusLast Update
0006617Kali LinuxKali Package Bugpublic2020-08-04 14:17
Reporterking_julian Assigned Tosbrun  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Summary0006617: Kali 2020.3 config parser error
Description

Hi .. new here so do apologies if not posting in the right section, but pls help ..
I use only the std rolling in my sources list .
When doing the last full upgrade I received 2020.3
Since the last upgrade I have been getting the error(details below ).
Posted in kali forums and stack exchange and nothing seems to help.
So would like to see if this is a bug in 2020.3.
Also not sure if I should have even received 2020.3 as it appears that 2020.2 is the current stable ?
/etc/os-release dies confirm codename=kali-rolling & ID=“2020.3”
Pls help APT now broken.

I did a sudo apt update && sudo apt full-upgrade -y and received the following error:

File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \

File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'

After reading, I think this is related to either a manual fiddling somewhere in /usr/bin (Now I have read never to do that, but I can't recall if ever I did in the past...), or something related to the default python version the distro requires.

This is what I can see in terms of the python on the system: /usr/bin/python is a link to python2 and python2 is a link to python2.7.
Not sure if this is pointing to the correct version or even related to the error above?

Python -V shows : 2.7.18

After some advise received , I tried :

sudo apt -f --reinstall install python-configparser
& This is what I got :

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 62.6 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://kali.download/kali kali-rolling/main amd64 python-configparser all 3.5.0b2-3 [62.6 kB]
Fetched 62.6 kB in 1s (57.7 kB/s)
(Reading database ... 402234 files and directories currently installed.)
Preparing to unpack .../python-configparser_3.5.0b2-3_all.deb ...
Unpacking python-configparser (3.5.0b2-3) over (3.5.0b2-3) ...
Setting up mercurial-common (5.4.1-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
dpkg: error processing package mercurial-common (--configure):
installed mercurial-common package post-installation script subprocess returned error exit status 1
Setting up python-configparser (3.5.0b2-3) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
dpkg: error processing package python-configparser (--configure):
installed python-configparser package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mercurial:
mercurial depends on mercurial-common (= 5.4.1-1); however:
Package mercurial-common is not configured yet.

dpkg: error processing package mercurial (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mercurial-common
python-configparser
mercurial

I still get the error.

Also noticed that ConfigParser is present in /usr/lib/python2.7 :

⚡ ls /usr/lib/python2.7 | grep Con

& this is what I get :
ConfigParser.py
ConfigParser.pyc

I now get this message even when trying to install posix man pages package as example. So everything on APT is then broken ?

Any ideas on how to troubleshoot or fix this please ?
Or is it possible to revert back to previous version ? I have not installed anything else since the upgrade.

Activities

sbrun

sbrun

2020-08-04 14:17

manager   ~0013195

I don't think it's a Kali bug. You probably did something that broke your system.

You can try to reinstall the Python 2 lib (it provides th ConfigParser.py):
libpython2.7-minimal

Or run the command dpkg -V
It will compare information from the files installed by a package with the files
metadata information stored in the dpkg database. It may help you to find the problem.

Issue History

Date Modified Username Field Change
2020-08-02 20:46 king_julian New Issue
2020-08-04 14:17 sbrun Assigned To => sbrun
2020-08-04 14:17 sbrun Status new => closed
2020-08-04 14:17 sbrun Resolution open => no change required
2020-08-04 14:17 sbrun Note Added: 0013195