WSL(Ubuntu)とカスペルスキーの組合せでapt updateがFailedになる場合の対応方法

どうも、Tです。

WSL(Windows Subsystem for Linux)のUbuntuでapt updateしたところFailedでできませんでしたので対応方法について記載します。

スポンサーリンク
アドセンス1

環境

  • Windows10:バージョン1809
  • WSL(Ubuntu):Ubuntu 18.04.1 LTS
  • カスペルスキーインターネットセキュリティ:18.0.0.405(k)

事象

WSLのUbuntuでapt update時に下記のエラー文が出力されます。aptコマンドの他のオプションも動きません。

$sudo apt update
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
  Connection failed [IP: 2001:67c:1560:8001::11 80]
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
  Connection failed [IP: 2001:67c:1560:8001::11 80]
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Connection failed [IP: 2001:67c:1360:8001::21 80]
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Connection failed [IP: 91.189.88.152 80]
Reading package lists... Done
Building dependency tree
Reading state information... Done
123 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Connection failed [IP: 2001:67c:1560:8001::11 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Connection failed [IP: 2001:67c:1360:8001::21 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Connection failed [IP: 91.189.88.152 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Connection failed [IP: 2001:67c:1560:8001::11 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

原因

aptで利用するポートをカルペルスキーが監視しており接続を拒否しているため。

解決方法

カスペルスキーを起動します。

左下の設定マークをクリックします。

「詳細」->「ネットワーク」をクリックします。

「ネットワークポート」の「選択」をクリックします。

「HTTP」を選択し、「編集」ボタンをクリックします。

「無効」を選択し「OK」ボタンをクリックします。

「HTTP」ポートの監視状態が無効になりました。

$sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [221 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [460 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [108 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [61.4 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [595 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [167 kB]
Fetched 1858 kB in 13s (144 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
123 packages can be upgraded. Run 'apt list --upgradable' to see them.

これでaptコマンドが通るようになりました。

まとめ

セキュリティソフトは守ってくれる分、こういうことがあるので困りますね。

[amazon_link asins=’B075WZ1XRD’ template=’T-dilemma-Original’ store=’t-dilemma-22′ marketplace=’JP’ link_id=’36db76a9-01c8-11e9-bbd3-5ba92db95387′]

スポンサーリンク
アドセンス1
アドセンス1
ブログランキング・にほんブログ村へ

シェアする

フォローする