当前位置:   article > 正文

关于Ubuntu中出现:Unable to fetch some archives, maybe run apt-get update or try with --fix-missing问题_ubuntu unable to fetch some archives

ubuntu unable to fetch some archives

在Ubuntu有网络的情况下,如果出现在进行 apt update或者apt install时,出现Unable to fetch some archives, maybe run apt-get update or try with --fix-missing问题,解决办法可以如下:

1.更换镜像

简介

Ubuntu,是一款基于 Debian Linux 的以桌面应用为主的操作系统,内容涵盖文字处理、电子邮件、软件开发工具和 Web 服务等,可供用户免费下载、使用和分享。

下载地址: /ubuntu/安装包下载_开源镜像站-阿里云

相关仓库

配置方法

1.打开设置

  1. cd /etc/apt/
  2. cp sources.list sources.list.bak
  3. vi /etc/apt/sources.list

2.打开后粘贴最新镜像源

比如,阿里云的镜像,最新版:

阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区

选择自己的 Ubuntu 版本,复制下面的代码到 sources.list

以Ubuntu 14.04.5 LTS为例,最后的效果如下:

  1. deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
  2. deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
  3. deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
  4. deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
  5. deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
  6. deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
  7. deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
  8. deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
  9. ## Not recommended
  10. # deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
  11. # deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

ubuntu 16.04 配置如下

  1. deb http://mirrors.aliyun.com/ubuntu/ xenial main
  2. deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
  3. deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
  4. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
  5. deb http://mirrors.aliyun.com/ubuntu/ xenial universe
  6. deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
  7. deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
  8. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
  9. deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
  10. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
  11. deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
  12. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

ubuntu 18.04(bionic) 配置如下

  1. deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
  2. deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  4. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  5. deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  6. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  7. # deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
  8. # deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
  9. deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
  10. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

ubuntu 20.04(focal) 配置如下

  1. deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  2. deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  4. deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  5. deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  6. deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  7. # deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
  8. # deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
  9. deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
  10. deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multivers

3.最后更新本地源

apt update    # 更新本地 apt 源
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/木道寻08/article/detail/915234
推荐阅读
相关标签
  

闽ICP备14008679号

        
cppcmd=keepalive&