On Fri, May 21, 2021 at 06:47:17PM -0400, Mohamud Ali wrote:
> dictionory
> Sorry, command-not-found has crashed! Please file a bug report at:
> http://www.debian.org/Bugs/Reporting
> Please include the following information with the report:
> 
> command-not-found version: 0.3
> Python version: 3.9.1 final 0
> Distributor ID:       Kali
> Description:  Kali GNU/Linux Rolling
> Release:      2021.1
> Codename:     kali-rolling
> Exception information:
> 
> unable to open database file
> Traceback (most recent call last):
>   File "/usr/share/command-not-found/CommandNotFound/util.py", line 23, in 
> crash_guard
>     callback()
>   File "/usr/lib/command-not-found", line 90, in main
>     cnf = CommandNotFound.CommandNotFound(options.data_dir)
>   File "/usr/share/command-not-found/CommandNotFound/CommandNotFound.py", 
> line 79, in __init__
>     self.db = SqliteDatabase(dbpath)
>   File "/usr/share/command-not-found/CommandNotFound/db/db.py", line 12, in 
> __init__
>     self.con = sqlite3.connect(filename)
> sqlite3.OperationalError: unable to open database file
>                                            

As others have said - this isn't a Kali Linux support channel. We're all 
volunteers here: Kali is Debian-derived but isn't Debian - this is best
endeavours support only.

You will get more support from https://www.kali.org/community/
the Kali Linux forums at https://forums.kali.org/ and you should search
the Kali Linux bugs at https://bugs.kali.org/my_view_page.php

You may wisth to point out to the folks at Kali that the report you've got 
also needs localising so that the error/bug report is not sent to Debian but 
to Kali.

It looks as if someone has had almost exactly the same error after updating
recently - it looks as if command-not-found was new to Kali Linux 2021.1 -
https://www.kali.org/blog/kali-linux-2021-1-release/ and someone on Reddit is
reporting 
https://www.reddit.com/r/Kalilinux/comments/l7srb7/could_not_find_commandnotfound_database_error/

One suggetion would be to run 

apt-file update 

as root/root equivalent using sudo which it appears has worked for some people, 

Another would be to run as root/root equivalent using sudo: 

update command-not-found 

to update the cache that command-not-found uses internally of packages that
it can find.

Alternatively, as root/sudo equivalent, you could try a reinstall of the 
package with 

apt install --reinstall command-not-found

which should fix any missing parts and will reinitialise databases on install

Hope this helps,

All best, as ever,
        
Andy Cater

[With luck, the subject change here will indicate a better answer so users
of Google or whatever will get a reliable answer and not worry on this one
here again]

Reply via email to