我想了解更多关于给定包的实际安装情况(用于debugging目的)。
apt-cache的所有选项都只提供依赖包,也许是所需的版本,而不是这些版本的安装版本。
我知道制作脚本并不难,但我很想find一个现有的解决scheme(我确定我不是第一个做这个的!)
我有点困惑你的问题,因为我知道它使用rdepends实用程序应该告诉你你需要什么(这应该是在你的回应中使用的任何发行版),例如:
$ apt-rdepends bash Reading package lists... Done Building dependency tree Reading state information... Done bash Depends: base-files (>= 2.1.12) Depends: debianutils (>= 2.15) PreDepends: libc6 (>= 2.7-1) PreDepends: libncurses5 (>= 5.6+20071006-3) base-files Depends: base-passwd (>= 2.0.3.4) PreDepends: awk ...
是什么显示为bash。
apt-get的“-s”选项会告诉你什么其他软件包将被安装到系统上安装一个特定的软件包,而不需要实际安装任何东西。 那是你在找什么?
xen1:~# apt-get -s install spamassassin Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: binutils cpp cpp-4.3 gcc gcc-4.3 libc6-dev libdigest-hmac-perl libdigest-sha1-perl liberror-perl libgmp3c2 libgomp1 libio-socket-inet6-perl libmail-spf-perl libmpfr1ldbl libnet-dns-perl libnet-ip-perl libnetaddr-ip-perl libsocket6-perl libsys-hostname-long-perl libsys-syslog-perl linux-libc-dev make re2c spamc Suggested packages: binutils-doc cpp-doc gcc-4.3-locales gcc-multilib manpages-dev autoconf automake1.9 libtool flex bison gdb gcc-doc gcc-4.3-multilib libmudflap0-4.3-dev gcc-4.3-doc libgcc1-dbg libgomp1-dbg libmudflap0-dbg glibc-doc make-doc razor libnet-ident-perl libio-socket-ssl-perl pyzor libmail-dkim-perl The following NEW packages will be installed: binutils cpp cpp-4.3 gcc gcc-4.3 libc6-dev libdigest-hmac-perl libdigest-sha1-perl liberror-perl libgmp3c2 libgomp1 libio-socket-inet6-perl libmail-spf-perl libmpfr1ldbl libnet-dns-perl libnet-ip-perl libnetaddr-ip-perl libsocket6-perl libsys-hostname-long-perl libsys-syslog-perl linux-libc-dev make re2c spamassassin spamc 0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded. Inst binutils (2.18.1~cvs20080103-7 Debian:5.0.1/stable) Inst libgmp3c2 (2:4.2.2+dfsg-3 Debian:5.0.1/stable) Inst libmpfr1ldbl (2.3.1.dfsg.1-2 Debian:5.0.1/stable) Inst cpp-4.3 (4.3.2-1.1 Debian:5.0.1/stable) Inst cpp (4:4.3.2-2 Debian:5.0.1/stable) Inst libgomp1 (4.3.2-1.1 Debian:5.0.1/stable) Inst gcc-4.3 (4.3.2-1.1 Debian:5.0.1/stable) Inst gcc (4:4.3.2-2 Debian:5.0.1/stable) Inst linux-libc-dev (2.6.26-15lenny2 Debian-Security:5.0/stable) Inst libc6-dev (2.7-18 Debian:5.0.1/stable) Inst libdigest-sha1-perl (2.11-2+b1 Debian:5.0.1/stable) Inst libdigest-hmac-perl (1.01-7 Debian:5.0.1/stable) Inst liberror-perl (0.17-1 Debian:5.0.1/stable) Inst libsocket6-perl (0.20-1 Debian:5.0.1/stable) Inst libio-socket-inet6-perl (2.54-1 Debian:5.0.1/stable) Inst libnetaddr-ip-perl (4.007+dfsg-2+b1 Debian:5.0.1/stable) Inst libnet-ip-perl (1.25-2 Debian:5.0.1/stable) Inst libnet-dns-perl (0.63-2 Debian:5.0.1/stable) Inst libmail-spf-perl (2.005-1 Debian:5.0.1/stable) Inst libsys-hostname-long-perl (1.4-2 Debian:5.0.1/stable) Inst libsys-syslog-perl (0.26-1 Debian:5.0.1/stable) Inst make (3.81-5 Debian:5.0.1/stable) Inst re2c (0.13.5-1 Debian:5.0.1/stable) Inst spamassassin (3.2.5-2 Debian:5.0.1/stable) Inst spamc (3.2.5-2 Debian:5.0.1/stable) Conf binutils (2.18.1~cvs20080103-7 Debian:5.0.1/stable) Conf libgmp3c2 (2:4.2.2+dfsg-3 Debian:5.0.1/stable) Conf libmpfr1ldbl (2.3.1.dfsg.1-2 Debian:5.0.1/stable) Conf cpp-4.3 (4.3.2-1.1 Debian:5.0.1/stable) Conf cpp (4:4.3.2-2 Debian:5.0.1/stable) Conf libgomp1 (4.3.2-1.1 Debian:5.0.1/stable) Conf gcc-4.3 (4.3.2-1.1 Debian:5.0.1/stable) Conf gcc (4:4.3.2-2 Debian:5.0.1/stable) Conf linux-libc-dev (2.6.26-15lenny2 Debian-Security:5.0/stable) Conf libc6-dev (2.7-18 Debian:5.0.1/stable) Conf libdigest-sha1-perl (2.11-2+b1 Debian:5.0.1/stable) Conf libdigest-hmac-perl (1.01-7 Debian:5.0.1/stable) Conf liberror-perl (0.17-1 Debian:5.0.1/stable) Conf libsocket6-perl (0.20-1 Debian:5.0.1/stable) Conf libio-socket-inet6-perl (2.54-1 Debian:5.0.1/stable) Conf libnetaddr-ip-perl (4.007+dfsg-2+b1 Debian:5.0.1/stable) Conf libnet-ip-perl (1.25-2 Debian:5.0.1/stable) Conf libnet-dns-perl (0.63-2 Debian:5.0.1/stable) Conf libmail-spf-perl (2.005-1 Debian:5.0.1/stable) Conf libsys-hostname-long-perl (1.4-2 Debian:5.0.1/stable) Conf libsys-syslog-perl (0.26-1 Debian:5.0.1/stable) Conf make (3.81-5 Debian:5.0.1/stable) Conf re2c (0.13.5-1 Debian:5.0.1/stable) Conf spamassassin (3.2.5-2 Debian:5.0.1/stable) Conf spamc (3.2.5-2 Debian:5.0.1/stable) xen1:~#