View Issue Details

IDProjectCategoryView StatusLast Update
0007899Kali Linux[All Projects] General Bugpublic2022-08-30 01:24
Reporterinkedone87 Assigned Tosteev  
PriorityimmediateSeverityminorReproducibilityhave not tried
Status resolvedResolutionduplicate 
Product Versionkali-dev 
Target VersionFixed in Version 
Summary0007899: -bash /usr/bin/apt-get: input output error
Descriptioncommand-not-found version: 0.3
Python version: 3.10.5 final 0
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2022.3
Codename: kali-rolling
Exception information:
database disk image is malformed
Traceback (most recent call last):
  File "/usr/share/command-not-found/CommandNotFound/util.py", line 23, in crash_guard
  File "/usr/lib/command-not-found", line 95, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
  File "/usr/share/command-not-found/CommandNotFound/CommandNotFound.py", line 344, in advise
  File "/usr/share/command-not-found/CommandNotFound/CommandNotFound.py", line 97, in get_packages
  File "/usr/share/command-not-found/CommandNotFound/db/db.py", line 19, in lookup
sqlite3.DatabaseError: database disk image is malformed


└─$ dpkg --list chromium
sh: 1: pager: Input/output error
dpkg-query: error: showing package list on pager subprocess returned error exit status 126

 apt install user-friendly package mangement
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
W: Not using locking for read only lock file /var/lib/dpkg/lock-frontend
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to locate package user-friendly
E: Unable to locate package package
E: Unable to locate package mangement

└─$ uname -a
Linux DESKTOP-O34TTT6 5.10.16.3-microsoft-standard-WSL2 0000001 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 GNU/Linux

└─$ python -v
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'posix' # <class '_frozen_importlib.BuiltinImporter'>
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
# installing zipimport hook
import 'time' # <class '_frozen_importlib.BuiltinImporter'>
import 'zipimport' # <class '_frozen_importlib.FrozenImporter'>
# installed zipimport hook
# /usr/lib/python3.10/encodings/__pycache__/__init__.cpython-310.pyc matches /usr/lib/python3.10/encodings/__init__.py
# code object from '/usr/lib/python3.10/encodings/__pycache__/__init__.cpython-310.pyc'
# /usr/lib/python3.10/__pycache__/codecs.cpython-310.pyc matches /usr/lib/python3.10/codecs.py
# code object from '/usr/lib/python3.10/__pycache__/codecs.cpython-310.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed84503400>
# /usr/lib/python3.10/encodings/__pycache__/aliases.cpython-310.pyc matches /usr/lib/python3.10/encodings/aliases.py
# code object from '/usr/lib/python3.10/encodings/__pycache__/aliases.cpython-310.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed842f89d0>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed845031c0>
# /usr/lib/python3.10/encodings/__pycache__/utf_8.cpython-310.pyc matches /usr/lib/python3.10/encodings/utf_8.py
# code object from '/usr/lib/python3.10/encodings/__pycache__/utf_8.cpython-310.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed84503160>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/lib/python3.10/__pycache__/io.cpython-310.pyc matches /usr/lib/python3.10/io.py
# code object from '/usr/lib/python3.10/__pycache__/io.cpython-310.pyc'
# /usr/lib/python3.10/__pycache__/abc.cpython-310.pyc matches /usr/lib/python3.10/abc.py
# code object from '/usr/lib/python3.10/__pycache__/abc.cpython-310.pyc'
import '_abc' # <class '_frozen_importlib.BuiltinImporter'>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed842f8d30>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed842f8b20>
# /usr/lib/python3.10/__pycache__/site.cpython-310.pyc matches /usr/lib/python3.10/site.py
# code object from '/usr/lib/python3.10/__pycache__/site.cpython-310.pyc'
# /usr/lib/python3.10/__pycache__/os.cpython-310.pyc matches /usr/lib/python3.10/os.py
# code object from '/usr/lib/python3.10/__pycache__/os.cpython-310.pyc'
# /usr/lib/python3.10/__pycache__/stat.cpython-310.pyc matches /usr/lib/python3.10/stat.py
# code object from '/usr/lib/python3.10/__pycache__/stat.cpython-310.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed842faf50>
# /usr/lib/python3.10/__pycache__/_collections_abc.cpython-310.pyc matches /usr/lib/python3.10/_collections_abc.py
# code object from '/usr/lib/python3.10/__pycache__/_collections_abc.cpython-310.pyc'
import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed842fb2b0>
# /usr/lib/python3.10/__pycache__/posixpath.cpython-310.pyc matches /usr/lib/python3.10/posixpath.py
# code object from '/usr/lib/python3.10/__pycache__/posixpath.cpython-310.pyc'
# /usr/lib/python3.10/__pycache__/genericpath.cpython-310.pyc matches /usr/lib/python3.10/genericpath.py
# code object from '/usr/lib/python3.10/__pycache__/genericpath.cpython-310.pyc'
import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed84335ae0>
import 'posixpath' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed842fb340>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed842f9b70>
# /usr/lib/python3.10/__pycache__/_sitebuiltins.cpython-310.pyc matches /usr/lib/python3.10/_sitebuiltins.py
# code object from '/usr/lib/python3.10/__pycache__/_sitebuiltins.cpython-310.pyc'
import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed842fac50>
Processing user site-packages
Processing global site-packages
Adding directory: '/usr/local/lib/python3.10/dist-packages'
Adding directory: '/usr/lib/python3/dist-packages'
Processing .pth file: '/usr/lib/python3/dist-packages/matplotlib-3.5.2-nspkg.pth'
# /usr/lib/python3.10/__pycache__/types.cpython-310.pyc matches /usr/lib/python3.10/types.py
# code object from '/usr/lib/python3.10/__pycache__/types.cpython-310.pyc'
import 'types' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed84337b80>
# /usr/lib/python3.10/importlib/__pycache__/__init__.cpython-310.pyc matches /usr/lib/python3.10/importlib/__init__.py
# code object from '/usr/lib/python3.10/importlib/__pycache__/__init__.cpython-310.pyc'
# /usr/lib/python3.10/__pycache__/warnings.cpython-310.pyc matches /usr/lib/python3.10/warnings.py
# code object from '/usr/lib/python3.10/__pycache__/warnings.cpython-310.pyc'
import 'warnings' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed843371f0>
import 'importlib' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed843374f0>
# /usr/lib/python3.10/importlib/__pycache__/util.cpython-310.pyc matches /usr/lib/python3.10/importlib/util.py
# code object from '/usr/lib/python3.10/importlib/__pycache__/util.cpython-310.pyc'
# /usr/lib/python3.10/importlib/__pycache__/_abc.cpython-310.pyc matches /usr/lib/python3.10/importlib/_abc.py
# code object from '/usr/lib/python3.10/importlib/__pycache__/_abc.cpython-310.pyc'
import 'importlib._abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed843360e0>
# /usr/lib/python3.10/__pycache__/contextlib.cpython-310.pyc matches /usr/lib/python3.10/contextlib.py
# code object from '/usr/lib/python3.10/__pycache__/contextlib.cpython-310.pyc'
# /usr/lib/python3.10/collections/__pycache__/__init__.cpython-310.pyc matches /usr/lib/python3.10/collections/__init__.py
# code object from '/usr/lib/python3.10/collections/__pycache__/__init__.cpython-310.pyc'
import 'itertools' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/lib/python3.10/__pycache__/keyword.cpython-310.pyc matches /usr/lib/python3.10/keyword.py
# code object from '/usr/lib/python3.10/__pycache__/keyword.cpython-310.pyc'
import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed84367b50>
# /usr/lib/python3.10/__pycache__/operator.cpython-310.pyc matches /usr/lib/python3.10/operator.py
# code object from '/usr/lib/python3.10/__pycache__/operator.cpython-310.pyc'
import '_operator' # <class '_frozen_importlib.BuiltinImporter'>
import 'operator' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed84367c10>
# /usr/lib/python3.10/__pycache__/reprlib.cpython-310.pyc matches /usr/lib/python3.10/reprlib.py
# code object from '/usr/lib/python3.10/__pycache__/reprlib.cpython-310.pyc'
import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed84367e20>
import '_collections' # <class '_frozen_importlib.BuiltinImporter'>
import 'collections' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed843647c0>
# /usr/lib/python3.10/__pycache__/functools.cpython-310.pyc matches /usr/lib/python3.10/functools.py
# code object from '/usr/lib/python3.10/__pycache__/functools.cpython-310.pyc'
import '_functools' # <class '_frozen_importlib.BuiltinImporter'>
import 'functools' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed843a4be0>
import 'contextlib' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed843659c0>
import 'importlib.util' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed84336bc0>
# /usr/lib/python3.10/importlib/__pycache__/machinery.cpython-310.pyc matches /usr/lib/python3.10/importlib/machinery.py# code object from '/usr/lib/python3.10/importlib/__pycache__/machinery.cpython-310.pyc'
import 'importlib.machinery' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed84365180>
Processing .pth file: '/usr/lib/python3/dist-packages/repoze.lru-0.7-nspkg.pth'
# possible namespace for /usr/lib/python3/dist-packages/repoze
Processing .pth file: '/usr/lib/python3/dist-packages/ruamel.yaml-0.17.16-nspkg.pth'
# possible namespace for /usr/lib/python3/dist-packages/ruamel
Processing .pth file: '/usr/lib/python3/dist-packages/zc.lockfile-2.0-nspkg.pth'
# possible namespace for /usr/lib/python3/dist-packages/zc
Processing .pth file: '/usr/lib/python3/dist-packages/zope.event-4.4-nspkg.pth'
Processing .pth file: '/usr/lib/python3/dist-packages/zope.interface-5.4.0-nspkg.pth'
# destroy zope
Adding directory: '/usr/lib/python3.10/dist-packages'
# /usr/lib/python3.10/__pycache__/sitecustomize.cpython-310.pyc matches /usr/lib/python3.10/sitecustomize.py
# code object from '/usr/lib/python3.10/__pycache__/sitecustomize.cpython-310.pyc'
import 'sitecustomize' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed843a6860>
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x7fed842f9540>
Python 3.10.5 (main, Jun 8 2022, 09:26:22) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
>>>
Steps To Reproduceapt install chromium
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
chromium is already the newest version (103.0.5060.134-1).
chromium set to manually installed.
The following packages were automatically installed and are no longer required:
  libhttp-server-simple-perl libwebsockets16
Use 'apt autoremove' to remove them.
W: Not using locking for read only lock file /var/lib/dpkg/lock-frontend
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Could not create temporary file for /var/lib/apt/extended_states - mkstemp (30: Read-only file system)
E: Failed to write temporary StateFile /var/lib/apt/extended_states
W: Not using locking for read only lock file /var/cache/apt/archives/lock
Additional Information/etc/chromium/default
-bash: /etc/chromium/default: Input/output error

add -user-data-dir flag
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.kali.org/bug_report_page.php
Please include the following information with the report:

command-not-found version: 0.3
Python version: 3.10.5 final 0
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2022.3
Codename: kali-rolling
Exception information:

database disk image is malformed
Traceback (most recent call last):
  File "/usr/share/command-not-found/CommandNotFound/util.py", line 23, in crash_guard
  File "/usr/lib/command-not-found", line 95, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
  File "/usr/share/command-not-found/CommandNotFound/CommandNotFound.py", line 344, in advise
  File "/usr/share/command-not-found/CommandNotFound/CommandNotFound.py", line 97, in get_packages
  File "/usr/share/command-not-found/CommandNotFound/db/db.py", line 19, in lookup
sqlite3.DatabaseError: database disk image is malformed

Relationships

duplicate of 0007898 closedsteev -bash /usr/bin/apt-get: input output error 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-08-30 00:23 inkedone87 New Issue
2022-08-30 01:24 steev Assigned To => steev
2022-08-30 01:24 steev Status new => resolved
2022-08-30 01:24 steev Resolution open => duplicate
2022-08-30 01:24 steev Relationship added duplicate of 0007898