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 / 问题

问题[apt-file](ubuntu)

Martin Hope
bentolor
Asked: 2019-10-30 09:23:03 +0800 CST

apt-file 不再查找或列出自 Ubuntu 19.10 eoan 以来的大部分内容

  • 3

更新 2: 这似乎是Contents-amd64.gz存储库中空文件的上游打包问题。因此,我在 Launchpad 报告了一个错误。

我是apt-file. 大多数文件我使用它来查找我需要安装特定的、丢失的文件的包,反之亦然,找出哪个包负责/拥有一个特定的文件。

自从我上次更新 eoan 以来,似乎apt-file已经完全失去了它的功能。它似乎也是一个不同的实现,因为apt-file update不再下载那些*Contents-amd64.diff.gz:相反,它做了一个简单的apt-get update

$ sudo -H apt-file update
Hit:1 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:2 http://archive.canonical.com/ubuntu eoan InRelease                                                                                   
Hit:3 http://ppa.launchpad.net/bit-team/testing/ubuntu eoan InRelease                                                                      
Hit:4 http://archive.ubuntu.com/ubuntu eoan InRelease                                                                                      
Hit:5 http://shop.softmaker.com/repo/apt wheezy InRelease                                                                                  
Hit:6 https://updates.signal.org/desktop/apt xenial InRelease                                                                              
Hit:7 http://ppa.launchpad.net/marko-preuss/hibiscus/ubuntu eoan InRelease                                
Hit:8 http://archive.ubuntu.com/ubuntu eoan-updates InRelease                      
Hit:9 http://ppa.launchpad.net/morphis/anbox-support/ubuntu disco InRelease        
Hit:10 http://archive.ubuntu.com/ubuntu eoan-security InRelease
Hit:11 http://archive.ubuntu.com/ubuntu eoan-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

而且我再也没有得到任何结果……

$ apt-file search /bin/bash
$ apt-file show bash

我知道dpkg -L <x>:这是我不想要的。我也不想离开我的终端去网上冲浪。

更新

事实上,它确实返回了一些结果,但不是完整的列表。事实上,在运行一个简单的apt-file search bash程序时,我确实从非常奇特的包中得到了一些罕见的结果

$ apt-file search bash
code: /usr/share/bash-completion/completions/code
code: /usr/share/code/resources/app/extensions/emmet/node_modules/dashdash/etc/dashdash.bash_completion.in
…
code: /usr/share/code/resources/completions/bash/code
code-exploration: /usr/share/bash-completion/completions/code
code-exploration: /usr/share/bash-completion/completions/code-exploration
…
code-insiders: /usr/share/bash-completion/completions/code
code-insiders: /usr/share/bash-completion/completions/code-insiders
…
linux-tools-common: /usr/share/bash-completion/completions/bpftool

此处对比 Linux Mint 19.2 等效 Ubuntu 18.04 安装的结果:

 $ apt-file search /bin/bash
bash: /bin/bash
bash: /usr/bin/bashbug
bash-static: /bin/bash-static
bashburn: /usr/bin/bashburn
pbh5tools: /usr/bin/bash5tools
pbh5tools: /usr/bin/bash5tools.py
package-management apt apt-file 19.10
  • 1 个回答
  • 227 Views
Martin Hope
Kalle Richter
Asked: 2019-09-01 01:15:37 +0800 CST

apt-file 正则表达式:使用或一次查找多个包

  • 4

我想使用带有逻辑或的正则表达式连接模式一次搜索多个包|。

假设这两个文件/usr/lib/apache2/modules/httpd.exp并/usr/lib/apt/apt.systemd.daily存在:

$ sudo dpkg -S /usr/lib/apache2/modules/httpd.exp
apache2-bin: /usr/lib/apache2/modules/httpd.exp
$ sudo dpkg -S /usr/lib/apt/apt.systemd.daily
apt: /usr/lib/apt/apt.systemd.daily

为什么apt-file search --regexp '/usr/lib/apache2/modules/httpd.exp|/usr/lib/apt/apt.systemd.daily'只返回

apache2-bin: /usr/lib/apache2/modules/httpd.exp

该解决方案旨在用于优化 GNOME 构建工具jhbuild。它应该适用于大量的 Ubuntu 版本。

apt regex apt-file
  • 1 个回答
  • 387 Views
Martin Hope
Tim
Asked: 2018-04-04 08:26:28 +0800 CST

apt-file 和 apt-cache 是 apt 的一部分吗?[复制]

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

是apt-file一部分apt?我已经apt默认安装了,但是没有apt-file。

怎么样apt-cache?我不记得我是默认安装的还是我安装的。

package-management apt apt-file
  • 1 个回答
  • 849 Views

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