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

2023-05-16

多次在apt install时候遇到E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?的error,Error报的信息显示是这个包向source里某个数据库下载失败了,或者在安装其它工具的时候提示该错误,这里记录一下:

1、source本身的问题:
根据提示,我们首先应当 apt-get update 一下source,如果在apt-get update后依然报这个error,那就说明这个source本省就有错误,尝试apt-get update --fix-missing后依旧报这个error;

解决方法:
切换软件源,之前使用的是阿里的,换为清华的没问题。
备份:将/etc/apt/sources.list文件备份;
修改:更换为清华软件源,
清华软件源链接.选择正确的版本,复制内容到sources.list文件中(替换原文件内容);
更新:sudo apt-get update; sudo apt-get upgrade;
重新安装sudo apt-get install build-essential 成功。

2 网络的问题:

网关错误拦截了数据包或者防火墙故意将其屏蔽在外(比方update 包含有google-chrome浏览器的source时候,ip 会自动重定向至6.6.6.6)
换网络试一下或者参见 https://blog.csdn.net/u013270341/article/details/79652359配置代理即可。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Ubuntu下E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 的相关文章

随机推荐