Error get_distro_info

Hello,

When executing the dkms status command to see the version of the installed driver, I get the following error:

root@DietPi:~# dkms status
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 39, in get_distro_info
    csvfile = open('/usr/share/distro-info/%s.csv' % origin.lower())
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/distro-info/debian.csv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bin/lsb_release", line 25, in <module>
    import lsb_release
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 58, in <module>
    get_distro_info()
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 42, in get_distro_info
    csvfile = open('/usr/share/distro-info/debian.csv')
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/distro-info/debian.csv'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 39, in get_distro_info
    csvfile = open('/usr/share/distro-info/%s.csv' % origin.lower())
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/distro-info/debian.csv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bin/lsb_release", line 25, in <module>
    import lsb_release
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 58, in <module>
    get_distro_info()
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 42, in get_distro_info
    csvfile = open('/usr/share/distro-info/debian.csv')
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/distro-info/debian.csv'
8812au, 5.6.4.2_35491.20191025, 5.10.17-v7l+, armv7l: installed
(failed reverse-i-search)`dkm': ^Cms status

I have tried reinstalling the following package but the problem is not resolved:

apt-get install --reinstall distro-info-data

root@DietPi:~# sudo apt-get install --reinstall distro-info-data
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 4 not upgraded.
Need to get 0 B/6640 B of archives.
After this operation, 0 B of additional disk space will be used.
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 106114 files and directories currently installed.)
Preparing to unpack .../distro-info-data_0.41+deb10u3_all.deb ...
Unpacking distro-info-data (0.41+deb10u3) over (0.41+deb10u3) ...
dpkg: error processing archive /var/cache/apt/archives/distro-info-data_0.41+deb10u3_all.deb (--unpack):
 unable to create '/usr/share/distro-info/debian.csv.dpkg-new' (while processing './usr/share/distro-info/debian.csv'): Structure needs cleaning
Errors were encountered while processing:
 /var/cache/apt/archives/distro-info-data_0.41+deb10u3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@DietPi:~#

Hi,

you have an error message indicating some file system corruption

Structure needs cleaning

Please try to have it repaired on reboot and check back fsck log:

> /forcefsck
reboot
# after reboot
journalctl -t systemd-fsck

OK, problem solved.

Thanks for answering

Hi,

pls can you share what solved your issue at the end?

I restored backup image.