apt가 특정 패키지를 설치한 이유를 찾는 방법

apt가 특정 패키지를 설치한 이유를 찾는 방법

Buster -monitoring-plugins-standard에 다음 패키지를 설치하려고 시도했는데 다음과 같은 출력이 나타났습니다.

The following additional packages will be installed:
  dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libarchive13 libassuan0 libavahi-client3 libavahi-common-data libavahi-common3
  libcups2 libdbi1 libgpgme11 libksba8 libldb1 libnet-snmp-perl libnpth0 libpq5 libradcli4 libsensors-config libsensors5 libsmbclient libsnmp-base libsnmp30 libtalloc2 libtdb1
  libtevent0 libtirpc-common libtirpc3 libwbclient0 pinentry-curses python-crypto python-gpg python-ldb python-samba python-talloc python-tdb rpcbind samba-common samba-common-bin
  samba-dsdb-modules samba-libs smbclient snmp

누군가 apt가 gnupg를 설치해야 하는 이유를 이해하도록 도와줄 수 있습니까?

권장 패키지를 확인하세요:

Recommends: bind9-host | host, dnsutils, libnet-snmp-perl, rpcbind, smbclient, snmp, sudo, libdbi1 (>= 0.8.4), libgnutls30 (>= 3.6.5), libldap-2.4-2 (>= 2.4.7), libmariadb3 (>= 3.0.0), libpq5, libradcli4, zlib1g (>= 1:1.1.4)

어떤 패키지가 gnupg를 강제로 설치하는지 이해가 되지 않습니다. gnupg 패키지를 예로 들어 추가 기능 패키지 설치 논리를 설명해 줄 수 있는 사람이 있습니까? 감사해요.

답변1

aptitude당신에게 말할 수 있습니다 :

$ aptitude why monitoring-plugins-standard gnupg
p   monitoring-plugins-standard Recommends smbclient
i A smbclient                   Depends    samba-common (= 2:4.9.5+dfsg-5+deb10u1)
i A samba-common                Recommends samba-common-bin
i A samba-common-bin            Recommends samba-dsdb-modules
i A samba-dsdb-modules          Depends    libgpgme11 (>= 1.2.0)
i A libgpgme11                  Recommends gpgsm
i A gpgsm                       Recommends gnupg (= 2.2.12-1+deb10u1)

패키지가 설치되어 있지 않아도 작동합니다.

답변2

Stephen의 답변은 이유를 찾는 방법을 알려줍니다. 확장 기능을 사용하면 gnupg설치를 원하지 않는 경우 이런 일이 발생하지 않도록 방지할 수 있습니다.

데비안 패키지는 다음을 포함한 다양한 종속성을 인식합니다.

  • a depends b: b패키지를 설치해야 합니다.
  • a recommends b: 패키지는 b선택사항이지만 권장됩니다. 기본적으로 설치됩니다.
  • a suggests b: 패키지가 b유용할 수 있지만 기본적으로 설치되지는 않습니다.

추천 으로 인해 gnupg(체인의 몇몇 지점에서도) 귀하는가지다설치하세요. install 명령 에 추가 하여 gnupg이를 알릴 수 있지만 -.--no-install-recommends--without-recommends

기본:

# apt install monitoring-plugins-standard
Suggested packages:
  dbus-user-session pinentry-gnome3 tor rblcheck parcimonie xloadimage scdaemon lrzip
  cups-common libcrypt-des-perl libdigest-hmac-perl libio-socket-inet6-perl lm-sensors
  snmp-mibs-downloader icinga | icinga2 fping qstat pinentry-doc python-crypto-doc
  heimdal-clients cifs-utils
The following NEW packages will be installed:
  dirmngr dnsutils gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client
  gpg-wks-server gpgconf gpgsm libarchive13 libassuan0 libavahi-client3
  libavahi-common-data libavahi-common3 libcups2 libdbi1 libgpgme11 libirs161 libjansson4
  libksba8 libldb1 libnet-snmp-perl libnpth0 libpq5 libradcli4 libsensors-config
  libsensors5 libsmbclient libsnmp-base libsnmp30 libtalloc2 libtdb1 libtevent0
  libwbclient0 monitoring-plugins-basic monitoring-plugins-common
  monitoring-plugins-standard pinentry-curses python-crypto python-gpg python-ldb
  python-samba python-talloc python-tdb rpcbind samba-common samba-common-bin
  samba-dsdb-modules samba-libs smbclient snmp sudo
0 upgraded, 54 newly installed, 0 to remove and 1 not upgraded.
Need to get 25.7 MB of archives.
After this operation, 85.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]

포함되지 않습니다 gnupg:

# apt install monitoring-plugins-standard gnupg- 
Suggested packages:
  dbus-user-session pinentry-gnome3 tor rblcheck scdaemon lrzip cups-common
  libcrypt-des-perl libdigest-hmac-perl libio-socket-inet6-perl lm-sensors
  snmp-mibs-downloader icinga | icinga2 fping qstat pinentry-doc python-crypto-doc
  heimdal-clients cifs-utils
Recommended packages:
  gnupg
The following NEW packages will be installed:
  dirmngr dnsutils gpg gpg-agent gpg-wks-client gpgconf gpgsm libarchive13 libassuan0
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdbi1 libgpgme11
  libirs161 libjansson4 libksba8 libldb1 libnet-snmp-perl libnpth0 libpq5 libradcli4
  libsensors-config libsensors5 libsmbclient libsnmp-base libsnmp30 libtalloc2 libtdb1
  libtevent0 libwbclient0 monitoring-plugins-basic monitoring-plugins-common
  monitoring-plugins-standard pinentry-curses python-crypto python-gpg python-ldb
  python-samba python-talloc python-tdb rpcbind samba-common samba-common-bin
  samba-dsdb-modules samba-libs smbclient snmp sudo
0 upgraded, 50 newly installed, 0 to remove and 1 not upgraded.
Need to get 22.6 MB of archives.
After this operation, 77.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]

제외사항 smbclient(이것이 도입된 이유입니다 gnupg):

# apt install monitoring-plugins-standard smbclient-
Suggested packages:
  rblcheck libcrypt-des-perl libdigest-hmac-perl libio-socket-inet6-perl lm-sensors
  snmp-mibs-downloader icinga | icinga2 fping qstat
Recommended packages:
  smbclient
The following NEW packages will be installed:
  dnsutils libdbi1 libirs161 libnet-snmp-perl libpq5 libradcli4 libsensors-config
  libsensors5 libsnmp-base libsnmp30 monitoring-plugins-basic monitoring-plugins-common
  monitoring-plugins-standard rpcbind snmp sudo
0 upgraded, 16 newly installed, 0 to remove and 1 not upgraded.
Need to get 6,904 kB of archives.
After this operation, 17.5 MB of additional disk space will be used.
Do you want to continue? [Y/n]

모든 추천 제외:

# apt install --no-install-recommends monitoring-plugins-standard 
Suggested packages:
  icinga | icinga2 fping qstat
Recommended packages:
  dnsutils libnet-snmp-perl rpcbind smbclient snmp sudo libdbi1 libpq5 libradcli4
The following NEW packages will be installed:
  monitoring-plugins-basic monitoring-plugins-common monitoring-plugins-standard
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Need to get 522 kB of archives.
After this operation, 3,088 kB of additional disk space will be used.
Do you want to continue? [Y/n]

(간결함을 위해 적절한 출력이 약간 편집됨)

관련 정보