lars@lars-desktop:~$ fuck
Traceback (most recent call last):
File "/usr/local/bin/thefuck", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/thefuck/entrypoints/main.py", line 31, in main
fix_command(known_args)
File "/usr/local/lib/python3.8/dist-packages/thefuck/entrypoints/fix_command.py", line 41, in fix_command
corrected_commands = get_corrected_commands(command)
File "/usr/local/lib/python3.8/dist-packages/thefuck/corrector.py", line 89, in get_corrected_commands
corrected for rule in get_rules()
File "/usr/local/lib/python3.8/dist-packages/thefuck/corrector.py", line 48, in get_rules
return sorted(get_loaded_rules(paths),
File "/usr/local/lib/python3.8/dist-packages/thefuck/corrector.py", line 17, in get_loaded_rules
rule = Rule.from_path(path)
File "/usr/local/lib/python3.8/dist-packages/thefuck/types.py", line 140, in from_path
rule_module = load_source(name, str(path))
File "/usr/lib/python3.8/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.8/dist-packages/thefuck/rules/apt_get.py", line 13, in <module>
_get_packages = CommandNotFound.CommandNotFound().get_packages
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 81, in __init__
raise FileNotFoundError("Cannot find database")
FileNotFoundError: Cannot find database
same problem in linux mint 20
I've got the same problem too
me too :(
Unfortunately, this is a problem with the command-not-found package in Ubuntu. Please, keep posted on the bugs that cause this issue on https://bugs.launchpad.net/ubuntu/+source/command-not-found — such as https://bugs.launchpad.net/command-not-found/+bug/1824000 and https://bugs.launchpad.net/command-not-found/+bug/1872557.
In the meantime, the issue can be solved with the python3-commandnotfound package being removed (apt remove python3-commandnotfound).
A change is on its way that will prevent the module of an excluded rule from being loaded. Stay tuned.
In the meantime, the issue can be solved with the
python3-commandnotfoundpackage being removed (apt remove python3-commandnotfound).
thanks, it works
Most helpful comment
thanks, it works