以下实践过程只是本人的个人纪录,他人的记录图片仅为个人实践中的参考,无意冒犯,谢谢!

使用基于Windows的Linux子系统,安装Ubuntu。安装Gcc时,出现如下错误:

查询很多资料,以下办法在本人的实践中无效  

[1]

[2]

 [3]

尝试404应该是防火长城的原因,使用参考文献[3]的第二种方法成功:

首先

sudo vim /etc/resolv.conf

再将界面中的deb软件包网站替换为

deb http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse

deb http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse

deb http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse

deb http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse

deb http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse

查询了一下,Ubuntu Old Releases 源包含了所有 Ubuntu 以前发布过的软件仓库、镜像 ISO,但 Ubuntu 衍生版的 ISO 则不包含。替换为阿里网易搜狐等源应该也是可以的。

最后一步

sudo apt-get update

用于更新安装依赖。

然后重新

apt install gcc

安装Gcc,就可以安装成功了

版本截图:

参考文献:

[1]宇舟.UNABLE TO CONNECT TO ARCHIVE.UBUNTU.COM:HTTP: [IP: 2001:67C:1360:8001::23 80] FETCHED 1,348 KB IN 24MIN 50S (904 B/S)[OL].https://www.cnblogs.com/zhouyuqiu/p/12831730.html,/2020.6.1

[2]vslyu.Ubuntu16.04下E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?备忘录[OL].https://blog.csdn.net/vslyu/article/details/82959552./2021.6.1

[3]tiny_lxf.解决Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?[OL].https://blog.csdn.net/tiny_lxf/article/details/75027865./2021.6.1

 

Logo

更多推荐