当前位置:   article > 正文

Ubuntu E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 错误

e: unable to fetch some archives, maybe run apt-get update or try with --fix

一、异常错误

  • apt install 时遇到这个问题,无法获取某些存档

二、原因

  • 网络连接超时

二、解决方法

1.网络问题

  • 网关错误拦截了数据包或者防火墙故意将其屏蔽在外
  • 可以尝试更换网络或者代理,再次下载
  • 或者更改配置文件sudo vim /etc/resolv.conf
  • 添加nameserver 8.8.8.8

2.source的问题

可以尝试运行

  • apt-get update
  • apt-get update --fix-missing

依然报错,则更换source源

  • 修改Ubuntu默认apt下载源
  • sudo vim /etc/apt/sources.list

将文件内容替换成

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

参考: Ubuntu 16.04 source.list 国内更新源

最后要更新一下,这个命令就相当于更新软件商店里面的目录

  • sudo apt-get update

再升级,相当于与软件目录对比,更新本地已经下载的软件

  • sudo apt-get upgrade
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小桥流水78/article/detail/915236
推荐阅读
相关标签
  

闽ICP备14008679号