aptが他のパッケージを暗黙的にインストールまたは削除するのはなぜですか?

aptが他のパッケージを暗黙的にインストールまたは削除するのはなぜですか?

package Xパッケージのインストール中に他のパッケージが暗黙的にインストールまたは削除されることがよくあります。

これは非常に迷惑なことであり、あなたが知る前に他の3つのパッケージはそのまま消えます。

Grive2もっと明確に言えば、今日はを使いたいので、まずインストールしたいとcmake思います。cmake

驚くべきことに、実行すると、他のようなapt install cmake -s他のパッケージがインストールされることがわかりましたphp7.0ettercaprtorrentuget

root@XXXXX_XXXXCE:/home/bob/pythontr# apt install cmake -s
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  coinor-libcbc3 coinor-libcgl1 coinor-libclp1 coinor-libcoinmp1v5 coinor-libcoinutils3v5 
coinor-libosi1v5 erlang-asn1
  erlang-base erlang-crypto erlang-mnesia erlang-public-key erlang-runtime-tools erlang-ssl 
fonts-opensymbol libabw-0.1-1
  libboost-date-time1.61.0 libboost-date-time1.62.0 libboost-filesystem1.62.0 libboost-
iostreams1.62.0
  libboost-locale1.62.0 libcdr-0.1-1 libclang-common-3.7-dev libclc-amdgcn libclc-dev 
libclc-r600 libclucene-contribs1v5
  libcmis-0.5-5v5 libcolamd2 libe-book-0.1-1 libeot0 libepubgen-0.1-1 libetonyek-0.1-1 
libexttextcat-2.0-0
  libexttextcat-data libfreehand-0.1-1 libjs-jquery-form liblangtag-common liblangtag1 
libllvm3.7 libmspub-0.1-1
  libmwaw-0.3-3 libmythes-1.2-0 libodfgen-0.1-1 liborcus-0.13-0 libpagemaker-0.0-0 
libqxp-0.0-0 librevenge-0.0-0 libsctp1
  libstaroffice-0.0-0 libsuitesparseconfig4 libtorrent19 libvisio-0.1-1 libwpd-0.10-10 
libwpg-0.3-3 libwps-0.4-4 libxmlsec1
  libxmlsec1-nss libzmf-0.0-0 lp-solve mesa-opencl-icd ocl-icd-libopencl1 uno-libs3 ure
**Use 'apt autoremove' to remove them.**
The following additional packages will be installed:
  cmake-data dirb erlang-asn1 erlang-base erlang-crypto erlang-mnesia erlang-public-key 
erlang-runtime-tools erlang-ssl
  ettercap-common ettercap-graphical libafflib0v5 libapache2-mod-php7.0 libcppunit-1.14-0 
libcurl4 libncurses6 libncursesw6
  librhash0 libtinfo6 libtorrent20 libxmlrpc-core-c3 osslsigncode php7.0-bz2 php7.0-cli     
php7.0-common php7.0-curl
  php7.0-dev php7.0-gd php7.0-json php7.0-mbstring php7.0-mysql php7.0-opcache php7.0-
readline php7.0-xml php7.0-zip
  rtorrent ruby-ethon uget
Suggested packages:
  cmake-doc ninja-build erlang erlang-manpages erlang-doc erlang-tools erlang-inets
Recommended packages:
  erlang-syntax-tools
The following packages will be REMOVED:
  couchdb erlang-eunit erlang-inets erlang-os-mon erlang-snmp erlang-syntax-tools 
erlang-tools erlang-webtool erlang-xmerl
  libcurl3
The following NEW packages will be installed:
  cmake cmake-data libcppunit-1.14-0 libcurl4 libncurses6 librhash0 libtorrent20
The following packages will be upgraded:
  dirb erlang-asn1 erlang-base erlang-crypto erlang-mnesia erlang-public-key erlang-    
runtime-tools erlang-ssl
  ettercap-common ettercap-graphical libafflib0v5 libapache2-mod-php7.0 libncursesw6     
libtinfo6 libxmlrpc-core-c3
  osslsigncode php7.0-bz2 php7.0-cli php7.0-common php7.0-curl php7.0-dev php7.0-gd 
php7.0-json php7.0-mbstring
  php7.0-mysql php7.0-opcache php7.0-readline php7.0-xml php7.0-zip rtorrent ruby-ethon     
uget

これらの追加のインストールはcmake

質問

apt1つのパッケージのみをインストールするように指示する方法はありますかcmakeいいえ関連していない他のパッケージを処理していますか?

[編集する]

@Stephen Kittのリクエストに応じて
実行すると、apt install -f次のものが返されます。

root@XXXXX_XXXXCE:/home/bob/pythontr# apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer  
required:
  coinor-libcbc3 coinor-libcgl1 coinor-libclp1 coinor-libcoinmp1v5
  coinor-libcoinutils3v5 coinor-libosi1v5 fonts-opensymbol libabw-0.1-1
  libboost-date-time1.61.0 libboost-date-time1.62.0 libboost-   
filesystem1.62.0
  libboost-iostreams1.62.0 libboost-locale1.62.0 libcdr-0.1-1
  libclang-common-3.7-dev libclc-amdgcn libclc-dev libclc-r600
  libclucene-contribs1v5 libcmis-0.5-5v5 libcolamd2 libe-book-0.1-1     
libeot0
  libepubgen-0.1-1 libetonyek-0.1-1 libexttextcat-2.0-0 libexttextcat-data
  libfreehand-0.1-1 liblangtag-common liblangtag1 libllvm3.7 libmspub-   
0.1-1
  libmwaw-0.3-3 libmythes-1.2-0 libodfgen-0.1-1 liborcus-0.13-0
  libpagemaker-0.0-0 libqxp-0.0-0 librevenge-0.0-0 libstaroffice-0.0-0
  libsuitesparseconfig4 libvisio-0.1-1 libwpd-0.10-10 libwpg-0.3-3
  libwps-0.4-4 libxmlsec1 libxmlsec1-nss libzmf-0.0-0 lp-solve
  mesa-opencl-icd ocl-icd-libopencl1 uno-libs3 ure
Use 'apt autoremove' to remove them.

[編集する]

cmakereturnを実行して依存関係apt-cache depends cmakeを一覧表示します。

root@XXXXX_XXXXCE:/home/bob/pythontr# apt-cache depends cmake
cmake
  Depends: cmake-data
  Depends: procps
  Depends: libarchive13
  Depends: libc6
  Depends: libcurl4
  Depends: libexpat1
  Depends: libgcc1
  Depends: libjsoncpp1
  Depends: librhash0
  Depends: libstdc++6
  Depends: libuv1
  Depends: zlib1g
  Recommends: gcc
  Recommends: make
    make-guile
  Suggests: cmake-doc
  Suggests: ninja-build

ベストアンサー1

一部の他のパッケージは、パッケージの推奨事項またはインストールを選択した推奨事項のため、依存関係としてインポートされます。推奨パッケージは必須ではありませんが、フル機能を使用するために必要です。推奨パッケージと提案パッケージとの関係の正確な詳細は、次のトピックで文書化されています。Debian ポリシー

--no-install-recommends推奨パッケージが依存関係にインポートされるのを防ぐために使用できます。

推奨または推奨パッケージを自動的にインストールしたくない場合は、設定ファイルを作成します /etc/apt/apt.conf.d/90-no-recommends.conf

APT::Install-Recommends 0;
APT::Install-Suggests 0;

パッケージが自動依存関係で自動的にインストールされ、アップグレード後にそのパッケージを依存関係にドラッグした元のパッケージが削除された場合、または不要になった場合は、後で自動的に削除するようにマークできます。

@StephenKittがコメントで指摘したように、これは完全な答えではないことに注意してください。推奨および提案の依存関係は、関連するすべてのパッケージを記述するわけではありません。上記のパッケージを含める必要がある他の理由があります。

おすすめ記事