首页 > 系统相关 >Ubuntu E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 错误

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

时间:2022-11-11 10:31:16浏览次数:42  
标签:run get -- restricted universe aliyun ubuntu main com


目录

  • ​​一、异常错误​​
  • ​​二、原因​​
  • ​​二、解决方法​​
  • ​​1.网络问题​​
  • ​​2.source的问题​​

一、异常错误

  • 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

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

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

  • ​sudo apt-get update​

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

  • ​sudo apt-get upgrade​


标签:run,get,--,restricted,universe,aliyun,ubuntu,main,com
From: https://blog.51cto.com/u_15872973/5843062

相关文章

  • P2024 食物链
    P2024食物链这道题我用了两种方法,也是刚学(发现并查集学的太少了)一个是种类并查集,另一个是带权并查集1种类并查集题目中有三种关系,分别是吃,被吃和同类;还有三类集合(三种......
  • Prometheus 监控Mysql服务器及Grafana可视化
    Prometheus监控Mysql服务器及Grafana可视化、mysql_exporter:用于收集MySQL性能信息。使用版本mysqld_exporter0.11.0官方地址使用文档:https://github.com/promethe......
  • 【k8s连载系列】2. k8s整体架构
    #一、Kubernetes的整体架构学习k8s,最终目的是为了部署应用,部署一个完整的k8s,就要知道k8s的组成。k8s主要包含两大部分:中间包含三个绿色包的是master服务器.下面是no......
  • 什么是Access Switch?
    什么是AccessSwitch?什么是AccessSwitch?Whatistheaccessswitch?WhatdoesanAccessLayerSwitchdo?TheDifferenceBetweenAccessSwitchandOtherSwit......
  • centos7自建yum仓库同步阿里云yum源
    背景:内网环境服务器不能直接安装工具或服务,可以用一台外网服务器同步阿里云的yum仓库,作为本地仓库搭建本地yum仓库编辑yum配置文件,开启缓存使用功能,设置缓存路径cp/e......
  • 学习笔记-frida硬件准备
    • 1.3Android/iOS– 1.3.1Androidroot• 1.3.1.1硬件准备• 1.3.1.2刷入官方Android8.1• 1.3.1.3刷入twrprecovery• 1.3.1.4刷入Magisk• 1.3.1.......
  • React
    基础React是用于构建用户的JS库(Facebook开源)使用JS进行操作DOM会进行大量的重绘重排列React采用组件化模式、声明式编码提高开发效率及组件复用率React使用虚拟DOM和Di......
  • 读取影像文件坐标系
    packagecom.by;importorg.gdal.gdal.Band;importorg.gdal.gdal.Dataset;importorg.gdal.gdal.Driver;importorg.gdal.gdal.gdal;importorg.gdal.gdalconst.gda......
  • Java Web项目中使用RSA加密数据
    在Web项目中有些时候需要对传输的数据加密后再传输到服务端进行解密使用,这里采用RSA进行公钥加密私钥解密的模式会有较高的安全性。这里选用的工具库是 JSEncrypt.js ......
  • redission分布式redis锁使用
    publicvoidlock(Stringkey,List<Long>idx){if(CollectionUtils.isEmpty(idx)){return;}idx.forEach(id->{RLocklock=redissonCl......