AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 836319
Accepted
user3405291
user3405291
Asked: 2016-10-13 18:50:14 +0800 CST2016-10-13 18:50:14 +0800 CST 2016-10-13 18:50:14 +0800 CST

Ubuntu 16.04 LTS 上的顶部(进程表)包 [重复]

  • 772
这个问题在这里已经有了答案:
如何找到提供文件的包? (10 个回答)
5年前关闭。

当我跑步时sudo apt install top,我得到E: Unable to locate package top

我在packages.ubuntu.com上搜索了 32 位 Ubuntu 16.04 LTS 上的顶级包,但没有。

我想知道这是正确的还是我遗漏了什么。

16.04
  • 2 2 个回答
  • 21581 Views

2 个回答

  • Voted
  1. Best Answer
    Terrance
    2016-10-13T19:11:28+08:002016-10-13T19:11:28+08:00

    它可能与procps软件包一起安装。它在所有 *NIX 操作系统中也很常见。如果你真的需要找到它安装了什么,apt-file首先安装:

    sudo apt install apt-file && apt-file update
    

    如果您运行which命令,它将返回安装它的文件夹:

    $ which top
    /usr/bin/top
    

    然后像这样进行搜索:

    apt-file search --regexp '/top$'
    

    它将返回如下列表:

    broctl: /usr/share/broctl/scripts/helpers/top
    crossfire-maps: /usr/share/games/crossfire/maps/santo_dominion/magara/well/top
    crossfire-maps-small: /usr/share/games/crossfire/maps/santo_dominion/magara/well/top
    liece: /usr/share/emacs/site-lisp/liece/styles/top
    lubuntu-extra-sessions: /usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top
    lxpanel: /etc/xdg/lxpanel/two_panels/panels/top
    procps: /usr/bin/top
    quilt: /usr/share/quilt/top
    trn4: /usr/share/doc/trn4/examples/univ/top
    trn4: /usr/share/trn4/HelpFiles/top
    

    然后你要做的就是匹配文件夹,也就是行首的包。

    或者,您可以将语句组合为一个,它应该返回更准确的结果:

    $ apt-file search --regexp "^$(which top)$"
    procps: /usr/bin/top
    

    希望这可以帮助!

    • 23
  2. edwinksl
    2016-10-13T19:40:07+08:002016-10-13T19:40:07+08:00

    如果您使用http://packages.ubuntu.com/查找提供的包,则top需要top在“搜索包的内容”部分中进行搜索。这种搜索的结果是:

    File                                                            Packages
    /etc/xdg/lxpanel/two_panels/panels/top                          lxpanel
    /usr/bin/top                                                    procps
    /usr/share/broctl/scripts/helpers/top                           broctl
    /usr/share/doc/trn4/examples/univ/top                           trn4
    /usr/share/emacs/site-lisp/liece/styles/top                     liece
    /usr/share/games/crossfire/maps/santo_dominion/magara/well/top  crossfire-maps, crossfire-maps-small
    /usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top            lubuntu-extra-sessions
    /usr/share/quilt/top                                            quilt
    /usr/share/trn4/HelpFiles/top                                   trn4
    

    在您的情况下,您很可能正在寻找提供 的包/usr/bin/top,即procps.

    毫不奇怪,搜索结果与apt-file@Terrance 的答案中提到的使用相同。

    • 13

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve