有一些这样的包实际上不能从存储库中获得,而是由其他包“提供”提供。
例如,包可能依赖于libc-dev
,但(至少在我的情况下)libc-dev
是由 提供的libc6-dev
。
有没有办法检查哪个包提供了其他包/依赖项?
答案1
我目前能想到的唯一方法是使用aptitude
:
$ aptitude search '~Plibc-dev' |head
i libc6-dev - GNU C Library: Development Libraries and Header Files
p libc6-dev-arm64-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
p libc6-dev-armel-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
p libc6-dev-armhf-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
p libc6-dev-hppa-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
p libc6-dev-m68k-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
p libc6-dev-mips-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
p libc6-dev-mips64-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
p libc6-dev-mips64el-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
p libc6-dev-mips64r6-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
$ _
答案2
我通常使用apt-cache showpkg
(在 ALT、Debian 和 Ubuntu 上):
root@rx2620:~# apt-cache showpkg libc-dev | tail
libattr1-dev,libc-dev
libamu-dev,libc-dev
libasound2-dev,libc-dev
libafterimage-dev,libc-dev
libacl1-dev,libc-dev
Dependencies:
Provides:
Reverse Provides:
libc6.1-dev 2.13-35
libc6.1-dev 2.13-38+deb7u10
root@rx2620:~#