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
目录
相关文章
|
5月前
|
Ubuntu Linux 时序数据库
|
2月前
|
Ubuntu Java 应用服务中间件
如何通过 Apt-Get 在 Ubuntu 14.04 上安装 Apache Tomcat 7
如何通过 Apt-Get 在 Ubuntu 14.04 上安装 Apache Tomcat 7
86 0
|
15天前
|
并行计算 Ubuntu 算法
Ubuntu18 服务器 更新升级CUDA版本 pyenv nvidia ubuntu1804 原11.2升级到PyTorch要求12.1 全过程详细记录 apt update
Ubuntu18 服务器 更新升级CUDA版本 pyenv nvidia ubuntu1804 原11.2升级到PyTorch要求12.1 全过程详细记录 apt update
49 0
|
2月前
|
Ubuntu 网络协议 数据安全/隐私保护
【Ubuntu】sudo apt-get update 无法解析域名(亲测有效)
在Ubuntu 18.04系统中,用户在执行sudo apt-get update时遇到“无法解析域名‘ip’”的错误。经分析,问题源于之前设置的网络代理配置未完全清除。解决方案是找到并重命名/etc/apt/apt.conf.d下的proxy.conf文件,使其不再生效。操作后,sudo apt-get update命令恢复正常,问题得到完美解决。
412 4
【Ubuntu】sudo apt-get update 无法解析域名(亲测有效)
|
3月前
|
Ubuntu Linux 文件存储
如何使用 Linux 构建自己的 NAS 系统?
【7月更文挑战第28天】
507 6
如何使用 Linux 构建自己的 NAS 系统?
|
2月前
|
Web App开发 缓存 Ubuntu
Linux中yum、rpm、apt-get、wget的区别,yum、rpm、apt-get常用命令,CentOS、Ubuntu中安装wget
Linux中yum、rpm、apt-get、wget的区别,yum、rpm、apt-get常用命令,CentOS、Ubuntu中安装wget
169 11
|
3月前
|
存储 缓存 Ubuntu
Ubuntu apt-get 命令大全
【7月更文挑战第12天】
123 6
Ubuntu apt-get 命令大全
|
3月前
|
缓存 Ubuntu Linux
|
4月前
|
Ubuntu Java Linux
Ubuntu20.04下载jdk遇到各种奇怪问题大集,Linux如何将默认的OpenJDK切换成自己安装的JDK版本(以JDK1.8为例),无需卸载原有OpenJDK,Some packages co
Ubuntu20.04下载jdk遇到各种奇怪问题大集,Linux如何将默认的OpenJDK切换成自己安装的JDK版本(以JDK1.8为例),无需卸载原有OpenJDK,Some packages co
|
5月前
|
缓存 Ubuntu 搜索推荐
Ubuntu执行apt-get install xxx报错怎么办?
如果以上步骤无法解决问题,你可以在搜索引擎或Linux社区中查找更详细的解决方案。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
63 0