View Issue Details

IDProjectCategoryView StatusLast Update
0007898Kali LinuxGeneral Bugpublic2022-08-30 16:07
Reporterinkedone87 Assigned Tosteev  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Product Versionkali-dev 
Summary0007898: -bash /usr/bin/apt-get: input output error
Description

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

└─$ 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 Reproduce

apt 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

has duplicate 0007899 resolvedsteev -bash /usr/bin/apt-get: input output error 

Activities

steev

steev

2022-08-30 01:26

manager   ~0016678

Okay, you're showing us the output of commands, but you didn't mention at all your setup, which, luckily, somewhere in the output, it mentions WSL.

How much disk space does your system have? Because by the looks of it, something went wrong with WSL. Can you provide dmesg output?

inkedone87

inkedone87

2022-08-30 02:05

reporter   ~0016679

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

┌──(jonathanrey㉿DESKTOP-O34TTT6)-[~]
└─$

output "dmesg"
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

inkedone87

inkedone87

2022-08-30 02:07

reporter   ~0016680

Physical Memory: 15,740 MB
Available Physical Memory: 6,248 MB
Virtual Memory: Max Size: 17,706 MB
Virtual Memory: Available: 5,109 MB
Virtual Memory: In Use: 12,597 MB
Page File Location(s):

inkedone87

inkedone87

2022-08-30 04:43

reporter   ~0016681

i got it thanks tho i figured it out !

inkedone87

inkedone87

2022-08-30 04:44

reporter   ~0016682

──(jonathanrey㉿DESKTOP-O34TTT6)-[~]
└─$ kex -esm -ip -s

Win-KeX server sessions:

X DISPLAY # RFB PORT # RFB UNIX PATH PROCESS ID # SERVER
1 5901 722 Xtigervnc

You can use the Win-KeX client to connect to any of these displays.

steev

steev

2022-08-30 16:07

manager   ~0016684

User reported they got it figured out.

Issue History

Date Modified Username Field Change
2022-08-29 23:25 inkedone87 New Issue
2022-08-30 01:24 steev Relationship added has duplicate 0007899
2022-08-30 01:26 steev Note Added: 0016678
2022-08-30 02:05 inkedone87 Note Added: 0016679
2022-08-30 02:07 inkedone87 Note Added: 0016680
2022-08-30 04:43 inkedone87 Note Added: 0016681
2022-08-30 04:44 inkedone87 Note Added: 0016682
2022-08-30 16:07 steev Assigned To => steev
2022-08-30 16:07 steev Status new => closed
2022-08-30 16:07 steev Resolution open => no change required
2022-08-30 16:07 steev Note Added: 0016684