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? 错误

一、异常错误


  • 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
目录
相关文章
|
1月前
|
缓存 Ubuntu 搜索推荐
Ubuntu执行apt-get install xxx报错怎么办?
如果以上步骤无法解决问题,你可以在搜索引擎或Linux社区中查找更详细的解决方案。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
12 0
|
6月前
|
存储 缓存 NoSQL
如何解决Ubuntu server 下 Redis安装报错:“You need tcl 8.5 or newer in order to run the Redis test”.
如何解决Ubuntu server 下 Redis安装报错:“You need tcl 8.5 or newer in order to run the Redis test”.
181 0
|
6月前
|
Ubuntu 安全
ubuntu sudo apt-get upgrade 和 sudo apt-get dist-upgrade区别
ubuntu sudo apt-get upgrade 和 sudo apt-get dist-upgrade区别
|
10月前
|
Ubuntu 开发工具 Docker
【Docker】在ubuntu容器内使用apt-get遇到网络连接错误的解决方案
【Docker】在ubuntu容器内使用apt-get遇到网络连接错误的解决方案
|
10月前
|
存储 缓存 Ubuntu
Ubuntu 包管理的 20 个“apt-get”命令
Ubuntu 包管理的 20 个“apt-get”命令
143 0
|
Ubuntu
ubuntu apt-get 安装软件时自动yes
ubuntu apt-get 安装软件时自动yes
119 0
|
Ubuntu Shell Apache
ubuntu apt-get卸载软件无法卸载干净的解决方法(ubuntu卸载apache)
ubuntu apt-get卸载软件无法卸载干净的解决方法(ubuntu卸载apache)
494 0
|
Ubuntu 开发工具
Ubuntu的apt-get源修改与使用
Ubuntu的apt-get源修改与使用
|
Ubuntu
【Ubuntu】apt-get install 报错 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
【Ubuntu】apt-get install 报错 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
136 0