apt-get install报错E: Failed to fetch问题解决

家电修理 2023-07-16 19:17www.caominkang.com电器维修

执行 sudo apt-get install gedit报错,我参考Ubuntu出现E: Failed to fetch问题解决,没解决,随后又参考了[解决方法] apt-get update报错 ‘E: Failed to stat /var/lib/apt/lists/partial/......‘解决了。大家按情况选取,下面记录我的操作过程

sudo vi /etc/resolv.conf

 在resolv.conf里面添加阿里DNS

nameserver 223.5.5.5  
nameserver 223.6.6.6

执行sudo apt-get update

sudo apt-get update

出现报错E: Failed to stat /var/lib/apt/lists/partial/......‘,解决方法如下

sudo rm -rf /var/lib/apt/lists/
sudo rm -rf /etc/apt/sources.list.d/
sudo apt-get update

使用sudo apt-get install gedit安装,即可成功

Copyright © 2016-2025 www.caominkang.com 曹敏电脑维修网 版权所有 Power by