在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

结果又报错了

根据报错提示执行编辑报错文件

打开报错文件找到如图

如有同样报错,继续编辑报错文件,添加所报错的缺失项

最后执行自己的测试命令,就不存在错误了

linux运行不存在的命令报错相关推荐

  1. linux 进入gedit命令,linux中gedit命令报错的案例分析

    linxu下的gedit命令相信大家都很熟悉,但是这么简单的命令也经常会报错.下面由学习啦小编为大家整理了linux的gedit命令的报错案例分析相关知识,希望对大家有帮助! linux中的gedit ...

  2. laravel项目运行 php artisan cache:clear 命令报错

    laravel项目运行 php artisan cache:clear 命令报错 vscode 项目运行 php artisan cache:clear 命令 出现报错 Failed to clear ...

  3. 在Linux执行命令报错”Arg list too long”的原因分析

    http://www.yunweipai.com/archives/558.html 在Linux执行命令报错"Arg list too long"的原因分析 吞拿鱼手卷 于 3 ...

  4. linux图形化界面进不去的问题(startx命令报错bash:startx command not found) 经验之谈

    1.首先怀疑没安装图形化界面 运行yum groupinstall "X Window System" 如果yum命令报错 出现could not retrieve mirrorl ...

  5. Linux CentOS 7安装之后,ip addr命令无法显示ip地址。ifconfig命令报错:未找到命令!

    文章目录 一.Linux CentOS 7安装之后,ip addr命令无法显示ip地址.ifconfig命令报错:未找到命令! 二.解决"ip addr命令无法显示ip地址"方法 ...

  6. 运行gitbook init命令报错及问题解决办法 TypeError [ERR_INVALID_ARG_TYPE]: The “data“ argument must be of type stri

    运行gitbook init命令报错,错误信息如下: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be o ...

  7. 电脑运行linux虚拟盘闪退,Linux 系统下启动Android模拟器报错闪退

    Linux 系统下启动Android模拟器报错 Emulator: libGL error: unable to load driver: radeonsi_dri.so Emulator: libG ...

  8. yum命令报错在linux下,执行yum命令报错

    执行yum命令报错信息如下: [root@webserver ~]# yum list rpmdb: Thread/process 26604/140491933587200 failed: Thre ...

  9. Linux下启动启动tomcat 服务器报错 The file is absent or does not have execute permission

    为什么80%的码农都做不了架构师?>>>    Linux下启动启动tomcat 服务器报错 The file is absent or does not have execute ...

最新文章

  1. 区块链还能赚钱吗 区块链挖矿赚钱吗
  2. 部署WAR包实时查看Tomcat的状态和日志
  3. 元素隐藏的三种方式对比(针对移动端项目中的按钮,先隐藏且不能被点击 visibility:hidden)
  4. 多线程下的生产者消费者(一个初始值为0的变量,两个线程一个加1一个减1,轮询5轮)
  5. 读中文_挑战来了!康辉喊你读中文十级绕口令!
  6. ASP.NET MVC one view bind many model
  7. 手机出货量暴跌!00后4年没换手机:除了贵、穷还有别的原因...
  8. CodeForces 379 E New Year Tree Decorations
  9. 7个设计模式的基本原则
  10. 微信小程序入门 ——增删改查+页面跳转+传值取值+布局样式
  11. 转载——python字符串常用操作(加案例)
  12. 【安全牛学习笔记】初识sql注入漏洞原理
  13. matlab超限像素平滑法_教程 | 不做手残党,玩转像素风LOGO的三大实用技巧!
  14. 递归算法经典实例python-Python递归算法详解
  15. Win10驱动签名总结
  16. 计算机行业的未来10年发展前景,未来10年,这4大工作就业前景好,发展前途超过公务员...
  17. 51单片机 16路抢答 显示在 点阵 普中 V2
  18. lotus notes 闪退_win10系统Lotus notes邮箱闪退的恢复办法
  19. Android开门动画和关门动画的实现
  20. 手机gif图片怎么压缩变小?gif动图怎样缩小?

热门文章

  1. python的webcamera
  2. html代码硬件加速优化,详解CSS3开启硬件加速的使用和坑
  3. 2021-11-19周赛总结
  4. ATF快速扫盲(Quick Start)
  5. html怎么设置一个div可以左右移动,利用css 使div上下左右移动
  6. css如何实现圆角边框
  7. 浅谈基于 OpenStack 和 k8s 轻量研发私有云建设
  8. 【BZOJ4424】Cf19E Fairy DFS树
  9. 索尼和微软将在云游戏领域合作
  10. 项目章程和项目管理计划