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

    在更新就没有错误了。

  • 相关阅读:
    对数据库文件信息进行批量删除
    php多条件查询
    实现条件查询
    在PHP中设置封装类文件
    php中什么是一维数组什么是二维数组
    登录注册的学习
    git系列---【git提交代码时,文件名过长导致报错:libgit2 returned: invalid path for filesystem】
    git系列---【初始工程文件太大或者文件数太多时,向远程仓库push时总是失败,如何解决?】
    git系列---【git的撤销命令】
    git系列---【git新建分支时,已经推送到远程,发现分支名错了,如何修改分支名,并推送到远程?】
  • 原文地址:https://www.cnblogs.com/litifeng/p/14829865.html
Copyright © 2011-2022 走看看