zoukankan      html  css  js  c++  java
  • wsl中debian无法连接到源

    使用wsl中的debian10更新时,出现如下错误:

    admin@DESKTOP:~$ sudo apt update
    Err:1 http://deb.debian.org/debian buster InRelease
      Could not connect to debian.map.fastlydns.net:80 (127.167.1.230). - connect (111: Connection refused) Cannot initiate the connection to debian.map.fastlydns.net:80 (fd00:696e:6974:6578::4f:1e7). - connect (101: Network is unreachable) Could not connect to deb.debian.org:80 (127.167.1.232). - connect (111: Connection refused) Cannot initiate the connection to deb.debian.org:80 (fd00:696e:6974:6578::4f:1e9). - connect (101: Network is unreachable)
    Err:2 http://deb.debian.org/debian buster-updates InRelease
      Cannot initiate the connection to deb.debian.org:80 (fd00:696e:6974:6578::4f:1e9). - connect (101: Network is unreachable)
    Err:3 http://ftp.debian.org/debian buster-backports InRelease
      Could not connect to debian.map.fastlydns.net:80 (127.167.1.230). - connect (111: Connection refused) Cannot initiate the connection to debian.map.fastlydns.net:80 (fd00:696e:6974:6578::4f:1e7). - connect (101: Network is unreachable) Could not connect to ftp.debian.org:80 (127.167.2.112). - connect (111: Connection refused) Cannot initiate the connection
    # This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /eto ftp.debian.org:80 (fd00:696e:6974:6578::4f:271). - connect (101: Network is unreachable)
    Err:4 http://security.debian.org/debian-security buster/updates InRelease
      Could not connect to debian.map.fastlydns.net:80 (127.167.1.230). - connect (111: Connection refused) Cannot initiate the connection to debian.map.fastlydns.net:80 (fd00:696e:6974:6578::4f:1e7). - connect (101: Network is unreachable) Could not connect to security.debian.org:80 (127.167.1.234). - connect (111: Connection refused) Cannot initiate the connection to security.debian.org:80 (fd00:696e:6974:6578::4f:1eb). - connect (101: Network is unreachable)
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    All packages are up to date.
    W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  Could not connect to debian.map.fastlydns.net:80 (127.167.1.230). - connect (111: Connection refused) Cannot initiate the connection to debian.map.fastlydns.net:80 (fd00:696e:6974:6578::4f:1e7). - connect (101: Network is unreachable) Could not connect to deb.debian.org:80 (127.167.1.232). - connect (111: Connection refused) Cannot initiate the connection to deb.debian.org:80 (fd00:696e:6974:6578::4f:1e9). - connect (101: Network is unreachable)
    W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease  Cannot initiate the connection to deb.debian.org:80 (fd00:696e:6974:6578::4f:1e9). - connect (101: Network is unreachable)
    W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease  Could not connect to debian.map.fastlydns.net:80 (127.167.1.230). - connect (111: Connection refused) Cannot initiate the connection to debian.map.fastlydns.net:80 (fd00:696e:6974:6578::4f:1e7). - connect (101: Network is unreachable) Could not connect to security.debian.org:80 (127.167.1.234). - connect (111: Connection refused) Cannot initiate the connection to security.debian.org:80 (fd00:696e:6974:6578::4f:1eb). - connect (101: Network is unreachable)
    W: Failed to fetch http://ftp.debian.org/debian/dists/buster-backports/InRelease  Could not connect to debian.map.fastlydns.net:80 (127.167.1.230). - connect (111: Connection refused) Cannot initiate the connection to debian.map.fastlydns.net:80 (fd00:696e:6974:6578::4f:1e7). - connect (101: Network is unreachable) Could not connect to ftp.debian.org:80 (127.167.2.112). - connect (111: Connection refused) Cannot initiate the connection to ftp.debian.org:80 (fd00:696e:6974:6578::4f:271). - connect (101: Network is unreachable)
    W: Some index files failed to download. They have been ignored, or old ones used instead.

    经过一番查询和乱搞下,发现修改dns服务器后就好了

    sudo vi /etc/resolv.conf

    把nameserver换成 8.8.8.8 和 8.8.4.4

    在重新启动一下网络:

    sudo /etc/init.d/networking restart

    在更新就没有错误了。

  • 相关阅读:
    python斐波那契数列
    Python 核心编程(第二版)第八章 练习完整答案[转载]
    MYSQL自动备份!
    PHP筛选法求质数。
    Python函数式编程指南(四):生成器(转载)
    试除法求质数的最快方法!
    Python函数式编程指南:目录和参考(转载)
    PHP冒泡算法
    maven默认web项目中的web.xml版本问题
    IDEA自动补全返回值类型的快捷键
  • 原文地址:https://www.cnblogs.com/litifeng/p/14829865.html
Copyright © 2011-2022 走看看