Some index files failed to download. They have been ignored, or old ones used instead.

今天服务器安装个包报错Some index files failed to download. They have been ignored, or old ones used instead.?这个是啥原因??

有点懵找了一下度娘,搜出了一波东西:

MV /var/lib/apt/lists ./lists.bak   # 备份
mkdir /var/lib/apt/lists            # 创建新的目录
更改源:
     vi /etc/apt/sources.list 将下面的源添加进去:

     deb http://mirrors.aliyun.com/debian wheezy main contrib non-free  
     deb-src http://mirrors.aliyun.com/debian wheezy main contrib non-free  
     deb http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free  
     deb-src http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free  
     deb http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free  
     deb-src http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free 

执行:

    sudo apt update
    但是我发现对我没用,百思不得其解,到底怎么回事了?在仔细看下报的错误,字面上意思就是文件下载不了?于是乎我就测试下找个域名下载文件试试呗,结果直接不通,下载不了,于是乎我就ping了下度娘,也ping不通
     其实答案已经很明确了,问题出在域名身上,
修改
      vi /etc/resolv.conf
添加: nameserver 8.8.8.8   问题解决!

 

  • 9
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值