有没有一个工具可以找出哪些包提供了文件?

发布于 2024-08-05 20:14:52 字数 487 浏览 4 评论 0原文

例如,如果 ./configure 或 Make 告诉我缺少 libX11.so.6,并且它在我的系统上不存在,是否有一个工具或网站可以让我输入

libX11.so.6


接下来是分发/拱门并返回

libx11-6 libx11-6-debug [或其他;询问自述文件可能会返回大量条目]

http://sysinf0.klabs.be/ 做了类似的事情一些发行版和架构,但似乎没有更新的发行版。此外,它们没有文件名条目,因此您需要 Google“packagename site:sysinf0.klabs.be”。

我对 Ubuntu 最感兴趣,但如果了解其他发行版的类似工具也很好。

For example, if ./configure or Make tells me I'm lacking libX11.so.6, and it's nowhere on my system, is there a tool or website into which I could type

libX11.so.6

followed by a distribution/arch and get back

libx11-6
libx11-6-debug [or whatever; asking README would probably return reams of entries]

http://sysinf0.klabs.be/ does something similar for some distributions and architectures, but it doesn't seem to have more recent distributions. Also, they don't have an entry for the filename so you need to Google "packagename site:sysinf0.klabs.be".

I'm most interested in Ubuntu, but it would be good to know about similar tools for other distributions as well.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

嘿看小鸭子会跑 2024-08-12 20:14:52

Debian 通过网站执行此操作:

  • 搜索软件包内容<下搜索软件包页面< /em>
  • 选项,其中“包含名称包含关键字的文件的包”对于“任何”体系结构上的不稳定发行版(因为它是最大的)

Ubuntu可能会做类似的事情,但我不这样做非常了解网站/启动板。

您还可以获取索引文件 ftp://ftp.us.debian.org/debian/dists/sid/Contents-i386.gz ,但由于它经常更改,因此网站选项可能更方便。

Debian does that via the website:

  • search the Packages page under Search contents of packages
  • the answer in this example
  • options selected where 'packages that contain files whose name contain the keyword' for the unstable distribution (as it is the largest) on 'any' architecture

Ubuntu probably does something similar but I don't know the website / launchpad that well.

You could also fetch the index file ftp://ftp.us.debian.org/debian/dists/sid/Contents-i386.gz but as it changes frequently the website option is probably more convenient.

情痴 2024-08-12 20:14:52
$ sudo apt-get install apt-file
$ sudo apt-file update
$ apt-file search libX11.so.6

apt-file 可以让您列出和搜索软件包的内容,无论它们是否安装在您的系统上。

$ sudo apt-get install auto-apt
$ sudo auto-apt update
$ sudo auto-apt updatedb
$ sudo auto-apt update-local
$ auto-apt run ./configure

为了实现更多自动化,auto-apt 将检测访问不存在文件的尝试,并自动提示您安装提供这些文件的软件包。

$ sudo apt-get install apt-file
$ sudo apt-file update
$ apt-file search libX11.so.6

apt-file will let you list and search the contents of packages whether or not they are installed on your system.

$ sudo apt-get install auto-apt
$ sudo auto-apt update
$ sudo auto-apt updatedb
$ sudo auto-apt update-local
$ auto-apt run ./configure

For even more automation, auto-apt will detect attempts to access non-existent files and automatically prompt you to install the packages providing those files.

蒗幽 2024-08-12 20:14:52

还有许多其他工具可以做到这一点
检查这个伟大的页面:http://www.debianhelp.co.uk/findfile.htm
适用于 Debian 或 Ubuntu

There is many other tools to do this
check this great page for this : http://www.debianhelp.co.uk/findfile.htm
It is for debian or Ubuntu

茶底世界 2024-08-12 20:14:52

如果你的机器上有一个文件,并且你想知道哪个包负责它,那么(在 Debian 和 Ubuntu 上)它是......

$ dpkg -S FILENAME

If you have a file on your machine, and you want to know which package is responsible for it, then (on Debian & Ubuntu) it's...

$ dpkg -S FILENAME
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文