在Linux中运行一个命令尝试是否存在,突然报错了
> Could not find the database of available applications, run update-command-not-found as root to fix this
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.7.3 candidate 1
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2019.2
Codename: n/a
Exception information:> local variable ‘cnf’ referenced before assignment
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 93, in main
if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
UnboundLocalError: local variable ‘cnf’ referenced before assignment> 根据报错提示需要以root用户运行update-commond-not-found> 结果又报错了
> 根据报错提示执行编辑报错文件
> 打开报错文件找到如图
> 如有同样报错,继续编辑报错文件,添加所报错的缺失项
> 最后执行自己的测试命令,就不存在错误了
本文链接: https://erik.xyz/2019/05/30/linux-yun-xing-bu-cun-zai-de-bao-cuo-ming-ling/
版权声明: 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。转载请注明出处!