V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
hzqim
V2EX  ›  问与答

求一个 Debian 下 apt 安装软件出错时,能提示正确包名的软件

  •  
  •   hzqim · 53 天前 · 893 次点击
    这是一个创建于 53 天前的主题,其中的信息可能已经有所发展或是发生改变。
    本站大佬说过,我也实践过,所以很肯定有这样一个软件。

    印象有收藏贴子,但现在找不到了,真收藏了个寂寞。

    不过依稀记得贴子的内容:某位 V 友提出 Debian 各种难用,各种功能缺失,不方便,其中就有安装软件没有提示不方便。
    第 1 条附言  ·  53 天前
    1 、软件就叫 command-not-found

    2 、更正:不是安装时提示,而是运行没有安装的软件时提示,如:

    在命令行输入:unzip -h

    如果没有安装 unzip 这个软件,这个软件就会从自身的数据库中查找提示:
    Command 'unzip' not found, but can be installed with:
    apt install unzip

    以取代默认提示:
    unzip: command not found


    3 、command-not-found 并不是全能,能否顺利给出提示,取决于数据库是否全面,比如 nc 命令就不能给出有效的提示。
    4 条回复    2024-07-28 23:09:04 +08:00
    yyzh
        1
    yyzh  
       53 天前 via Android   ❤️ 1
    /t/1037576
    不过还是建议直接上 ubuntu 或者 ubuntu 的变种(如果你讨厌 snap 的话)
    hefish
        2
    hefish  
       53 天前
    dkg -l 这样吗?
    hzqim
        3
    hzqim  
    OP
       53 天前
    @yyzh 谢谢,就是这个贴子,就是兄台你在贴子中#5 楼的发言。😀
    hzqim
        4
    hzqim  
    OP
       53 天前
    @hefish 我寻找的答案在这里:
    https://www.v2ex.com/t/1037576#r_14667655
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1005 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 22:18 · PVG 06:18 · LAX 15:18 · JFK 18:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.