运行 apt-get update 会在 WSL 上显示所有“Ign”

运行 apt-get update 会在 WSL 上显示所有“Ign”

今天早上我尝试sudo apt-get update在运行 WSL 的 Ubuntu 16.04 上运行,它只是一遍又一遍地尝试每个服务器,不断产生Ign响应。这到底是怎么回事?

Windows 10 - 1809
WSL - Ubuntu 16.04:
分销商 ID:Ubuntu
描述:Ubuntu 16.04.5 LTS
发行版:16.04
代号:xenial

不确定这是否是 WSL 的问题,但认为提及这一点也没什么坏处。

$ sudo apt-get update
Ign:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Ign:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Ign:3 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease
Ign:4 http://downloads.skewed.de/apt/xenial xenial InRelease
Ign:5 http://security.ubuntu.com/ubuntu xenial-security Release
Ign:6 http://downloads.skewed.de/apt/xenial xenial Release
Ign:7 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Ign:8 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial InRelease
Ign:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages.diff/Index
Ign:10 http://downloads.skewed.de/apt/xenial xenial/universe Sources.diff/Index
Ign:11 http://security.ubuntu.com/ubuntu xenial-security/main all Packages
Ign:12 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Ign:13 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial Release
Ign:14 http://downloads.skewed.de/apt/xenial xenial/universe amd64 Packages.diff/Index
Ign:15 http://downloads.skewed.de/apt/xenial xenial/universe all Packages
Ign:16 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en_US
Ign:17 http://archive.ubuntu.com/ubuntu xenial Release
Ign:18 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial Release
Ign:19 http://downloads.skewed.de/apt/xenial xenial/universe Translation-en_US
Ign:20 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en.diff/Index
Ign:21 http://downloads.skewed.de/apt/xenial xenial/universe Translation-en
Ign:22 http://archive.ubuntu.com/ubuntu xenial-updates Release
Ign:23 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial/main amd64 Packages.diff/Index
Ign:24 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages.diff/Index
Ign:25 http://downloads.skewed.de/apt/xenial xenial/universe Sources
Ign:26 http://downloads.skewed.de/apt/xenial xenial/universe amd64 Packages
Ign:27 http://archive.ubuntu.com/ubuntu xenial-backports Release
Ign:28 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial/main all Packages
Ign:29 http://security.ubuntu.com/ubuntu xenial-security/restricted all Packages
Ign:15 http://downloads.skewed.de/apt/xenial xenial/universe all Packages
Ign:30 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en_US
Ign:31 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages.diff/Index
Ign:19 http://downloads.skewed.de/apt/xenial xenial/universe Translation-en_US
Ign:32 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial/main Translation-en_US
Ign:33 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en.diff/Index
Ign:21 http://downloads.skewed.de/apt/xenial xenial/universe Translation-en
Ign:34 http://archive.ubuntu.com/ubuntu xenial/main all Packages
Ign:35 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial/main Translation-en.diff/Index
Ign:25 http://downloads.skewed.de/apt/xenial xenial/universe Sources
Ign:36 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages.diff/Index
Ign:26 http://downloads.skewed.de/apt/xenial xenial/universe amd64 Packages
Ign:37 http://security.ubuntu.com/ubuntu xenial-security/universe all Packages
Ign:38 http://archive.ubuntu.com/ubuntu xenial/main Translation-en_US
Ign:39 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial/main amd64 Packages.diff/Index
Ign:15 http://downloads.skewed.de/apt/xenial xenial/universe all Packages
Ign:40 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en_US
Ign:19 http://downloads.skewed.de/apt/xenial xenial/universe Translation-en_US
Ign:41 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial/main all Packages
Ign:42 http://archive.ubuntu.com/ubuntu xenial/main Translation-en.diff/Index
Ign:21 http://downloads.skewed.de/apt/xenial xenial/universe Translation-en
Ign:43 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en.diff/Index
Ign:44 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial/main Translation-en_US
Ign:45 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages.diff/Index
Ign:25 http://downloads.skewed.de/apt/xenial xenial/universe Sources
Ign:46 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages.diff/Index
Ign:26 http://downloads.skewed.de/apt/xenial xenial/universe amd64 Packages
Ign:47 http://security.ubuntu.com/ubuntu xenial-security/multiverse all Packages
Ign:48 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial/main Translation-en.diff/Index
Ign:49 http://archive.ubuntu.com/ubuntu xenial/restricted all Packages
Ign:15 http://downloads.skewed.de/apt/xenial xenial/universe all Packages  

答案1

对我来说,这是由 WSL 中的 DNS 设置引起的。通过编辑 来修复/etc/resolv.conf,以使用nameserver 8.8.8.8

答案2

此行为是由防病毒程序阻止来自 Windows Subsystem for Linux 的 HTTP/HTTPS 流量引起的。

相关内容