debian Bullseyeとdebian bookworm-slimの間にはnetcatのインストールプロセスに違いがあります。

debian Bullseyeとdebian bookworm-slimの間にはnetcatのインストールプロセスに違いがあります。

存在するdebian:bullseye

oot@4770c7ba00ac:/# apt install -y netcat
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libbsd0 libmd0 netcat-openbsd
The following NEW packages will be installed:
  libbsd0 libmd0 netcat netcat-openbsd

存在するdebian:bookworm-slim

apt install -y netcat
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package netcat is a virtual package provided by:
  netcat-openbsd 1.219-1
  netcat-traditional 1.10-47
You should explicitly select one to install.

E: Package 'netcat' has no installation candidate

このような違いが発生するのはなぜですか?netcatを指すようにどのように事前設定しますかnetcat-openbsd

ベストアンサー1

Debian 11 ではnetcatコンバージョンパッケージです。netcat-openbsd。ステージングパッケージがDebian 12から削除されたので、netcat必要な実装を明示的に選択する必要があります。これを引き続き使用するには、以下をnetcat-openbsd使用するようにインストールを変更します。

apt-get install -y netcat-openbsd

netcat-openbsd(および他の実装)は、期待どおりに動作するようにnetcat代替を設定します。ncnetcat

おすすめ記事