我在 Windows 10 上运行 Ubuntu。我知道,我知道,对不起。这不是我的个人电脑,我试图这样做是为了避免使用虚拟机,因为虚拟机的内存效率更高。无论如何,我很难诊断问题,因为我发现的其他解决方案似乎在这种情况下都没有任何意义。
irh@MM212767-PC:~$ wget google.com
--2018-06-08 13:18:34-- http://google.com/
Resolving google.com (google.com)... 172.217.8.14, 2607:f8b0:4004:803::200e
Connecting to google.com (google.com)|172.217.8.14|:80... failed: Resource temporarily unavailable.
Connecting to google.com (google.com)|2607:f8b0:4004:803::200e|:80... failed: Network is unreachable.
ihoover@MM212767-PC:~$ ping google.com
PING google.com (172.217.8.14) 56(84) bytes of data.
64 bytes from iad23s59-in-f14.1e100.net (172.217.8.14): icmp_seq=1 ttl=52 time=14.4 ms
64 bytes from iad23s59-in-f14.1e100.net (172.217.8.14): icmp_seq=2 ttl=52 time=13.9 ms
64 bytes from iad23s59-in-f14.1e100.net (172.217.8.14): icmp_seq=3 ttl=52 time=16.8 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 13.984/15.111/16.880/1.266 ms
irh@MM212767-PC:~$ curl google.com
curl: (7) Failed to connect to google.com port 80: Connection refused
irh@MM212767-PC:~$ sudo apt update
Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Could not connect to archive.ubuntu.com:80 (91.189.88.149). - connect (111: Connection refused) [IP: 91.189.88.149 80]Err:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.149 80]
Err:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.149 80]
Err:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Could not connect to security.ubuntu.com:80 (91.189.88.152). - connect (111: Connection refused) [IP: 91.189.88.152 80]
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.149). - connect (111: Connection refused) [IP: 91.189.88.149 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.149 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.149 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Could not connect to security.ubuntu.com:80 (91.189.88.152). - connect (111: Connection refused) [IP: 91.189.88.152 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
感谢您的帮助!
编辑:必须设置 Ubuntu 才能访问正确的公司代理服务器。现在一切运行正常。
答案1
你在评论中指出这是一台工作电脑。我敢打赌有防火墙和访问控制列表来控制系统如何访问互联网在网络的边界。
许多公司对您访问互联网的方式都有限制,其中包括控制您可以访问的网站类型的策略,并且许多公司都有控制数据访问的特定网关或代理。
因为你实际上没有控制计算机或网络,您需要与工作中的 IT 团队沟通,以确定如何通过 WSL 从您的设备正确访问互联网。不过,我已做好准备迎接一些阻力,因为许多 IT 团队不希望您运行不该运行的东西(我猜 WSL 属于这一类),或者在没有他们的授权/审查的情况下运行它们。