インストールされたパッケージが必要以上に最新のときにiptablesをどのようにインストールしますか?

インストールされたパッケージが必要以上に最新のときにiptablesをどのようにインストールしますか?

必須パッケージには最新バージョンがインストールされています。

sudo apt install libiptc0   libxtables12
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libiptc0 is already the newest version (1.8.5-3~bpo10+1).
libxtables12 is already the newest version (1.8.5-3~bpo10+1).
0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.

iptablesをインストールしてみてください:

sudo apt install  iptables
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 iptables : Depends: libiptc0 (= 1.8.2-4) but 1.8.5-3~bpo10+1 is to be installed
            Depends: libxtables12 (= 1.8.2-4) but 1.8.5-3~bpo10+1 is to be installed
E: Unable to correct problems, you have held broken packages.

インストールされたパッケージが必要以上に最新のときにiptablesをどのようにインストールしますか?

uname -a
Linux debian 5.10.0-0.bpo.5-amd64 #1 SMP Debian 5.10.24-1~bpo10+1 (2021-03-29) x86_64 GNU/Linux

ベストアンサー1

インストールされたライブラリは、Debian 10ではなくBusterバックポートからインポートされます。デフォルトでは、Backportsリポジトリはインストール候補ではないため、一致するリポジトリをインストールするには適切iptablesなリポジトリを有効にする必要があります。

sudo apt install -t buster-backports iptables

あるいは、ライブラリを強制的にダウングレードすることもできます。

sudo apt install iptables libiptc0/stable libxtables12/stable

おすすめ記事