Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.3k views
in Technique[技术] by (71.8m points)

在Win10(2004) linux kali子系统,apt-get update出现Failed to fetch...错误

  1. 下面是详情

    └─# sudo apt-get update && sudo apt-get upgrade
    Ign:1 https://mirrors.ustc.edu.cn/kali kali-rolling InRelease
    Ign:1 https://mirrors.ustc.edu.cn/kali kali-rolling InRelease
    Ign:1 https://mirrors.ustc.edu.cn/kali kali-rolling InRelease
    Err:1 https://mirrors.ustc.edu.cn/kali kali-rolling InRelease
      Temporary failure resolving 'mirrors.ustc.edu.cn'
    Reading package lists... Done
    W: Failed to fetch https://mirrors.ustc.edu.cn/kali/dists/kali-rolling/InRelease  Temporary failure resolving 'mirrors.ustc.edu.cn'
    W: Some index files failed to download. They have been ignored, or old ones used instead.
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
  2. 我在网上看到一些解决方案,一般都是更改源和代理这些我都做了,但是并不能解决问题,当然DNS和源我也都尝试了其他的,现在的如下

    --- /etc/resolv.conf
    # This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /># [network]
    # generateResolvConf = false
    nameserver 114.114.114.114
    nameserver 223.5.5.5
    nameserver 223.6.6.6
    --- /etc/apt/sources.list:
    deb https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
    deb-src https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
  3. 应该确定的是我的网络没有问题(我相信这是一种检验方式)

    └─# ping 114.114.114.114
    PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
    64 bytes from 114.114.114.114: icmp_seq=1 ttl=91 time=33.1 ms
    64 bytes from 114.114.114.114: icmp_seq=2 ttl=80 time=32.4 ms
    ......
    ^C
    --- 114.114.114.114 ping statistics ---
    7 packets transmitted, 6 received, 14.2857% packet loss, time 6007ms
    rtt min/avg/max/mdev = 32.449/32.914/33.226/0.264 ms
  4. 我还看到一些提到代理的问题,我也根据提示输入了一些cmd命令,同样无果。虽然我不是很明白但是我感觉,这个问题更有可能和Windows有关,在此期间有一段时间按照上面的配置,没有出现问题(后来)我运行了代理软件,又不行了。
  5. 我这么做的目的是正常安装更新软件,比如安装桌面环境等
    事实上会出现下面这样

    ┌──(root??Laptop)-[***]
    └─# apt-get install gnome-core kali-defaults kali-root-login desktop-base
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package gnome-core
    E: Unable to locate package kali-root-login
    E: Unable to locate package desktop-base
    ┌──(root??Laptop)-[***]
    └─#
    

希望得到您的帮助,感谢


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...