已安装的 Debian 软件包列表 - 但有一些变化

发布于 2024-09-16 14:23:05 字数 274 浏览 4 评论 0原文

我有一个旧的 Debian 盒子,我在很长一段时间内大量使用它,它无法再干净地启动,所以我拿出一张新的 Ubuntu Live CD 给它第二次生命的机会。我备份了所有文件,但现在我想查看我安装了哪些软件包。问题: dpkg 维护者似乎只希望有人从有问题的操作系统中执行此操作,而不是寄生 Live CD。最终结果是谷歌完全没有关于如何做到这一点的结果。

我将尝试找出 dpkg 在给定 --list 选项的情况下读取哪些文件,然后移植正确的文件,但我希望有一个比我计划做的更好的选择。

有什么想法吗?

I have an old Debian box that I used heavily over a long period of time that will no longer boot cleanly, so I pulled out a new Ubuntu Live CD to give it a second chance at life. I backed up all my files, but now I want to review what packages I had installed. Problem: It appears that the dpkg maintainers only expect a person to do this from the operating system in question, rather than a parasitic Live CD. The end result is a complete lack of Google results of how to do this.

I'm going to try figuring out which files dpkg reads given the --list option, and then transplanting the proper files, but I'd prefer there to be a better option than what I plan on doing.

Any ideas?

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

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

发布评论

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

评论(1

雅心素梦 2024-09-23 14:23:06

您所需要做的就是 chroot 到您备份的文件系统,然后从那里运行 dpkg -la 。您还可以执行 dpkg -la --root=/your/backup/dir 而无需 chroot。

如果以允许 chroot 的方式提取文件系统不方便,那么您要查找的文件是 /var/lib/dpkg/status。该格式相当不言自明;已安装的软件包将列为状态:安装成功

All you need to do is chroot into the filesystem you backed up, and run dpkg -la from there. You can also do dpkg -la --root=/your/backup/dir without chrooting.

If it's inconvenient to extract the filesystem in a way that lets you chroot into it, then the file you're looking for is /var/lib/dpkg/status. The format is fairly self-explanatory; packages that are installed will be listed as Status: install ok installed.

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