使用apt-get update命令卡在waiting for headers

今天,想在自己的debian系统里面装下java8,添加了一个源update的时候出现的点问题就ctrl c了。没想到之后再update就不行了。一直卡在100%正在读报头waiting for headers。网上查了一遍大多数都是复制黏贴的不靠谱。试了半天。也reboot过。最后终于找到有用的办法。

就是去删掉/var/lib/apt/lists/里面所有的东西。

root@debian:/usr# apt-get update
忽略 http://mirrors.aliyun.com jessie InRelease
命中 http://mirrors.aliyun.com jessie-proposed-updates InRelease
命中 http://mirrors.aliyun.com jessie Release.gpg                            
命中 http://mirrors.aliyun.com jessie Release                                
命中 http://ppa.launchpad.net trusty InRelease                               
获取:1 http://mirrors.aliyun.com jessie-proposed-updates/main Sources/DiffIndex [27.8 kB]
获取:2 http://mirrors.aliyun.com jessie-proposed-updates/non-free Sources/DiffIndex [18.0 kB]
获取:3 http://mirrors.aliyun.com jessie-proposed-updates/contrib Sources/DiffIndex [7,762 B]
获取:4 http://mirrors.aliyun.com jessie-proposed-updates/main i386 Packages/DiffIndex [27.8 kB]
获取:5 http://mirrors.aliyun.com jessie-proposed-updates/non-free i386 Packages/DiffIndex [19.0 kB]
获取:6 http://mirrors.aliyun.com jessie-proposed-updates/contrib i386 Packages/DiffIndex [7,900 B]
获取:7 http://mirrors.aliyun.com jessie-proposed-updates/contrib Translation-en/DiffIndex [8,392 B]
获取:8 http://mirrors.aliyun.com jessie-proposed-updates/main Translation-en/DiffIndex [27.8 kB]
获取:9 http://mirrors.aliyun.com jessie-proposed-updates/non-free Translation-en/DiffIndex [18.0 kB]
获取:10 http://ppa.launchpad.net trusty/main Sources [663 B]
获取:11 http://ppa.launchpad.net trusty/main i386 Packages [1,701 B]
获取:12 http://ppa.launchpad.net trusty/main Translation-en [910 B]  
100% [正在等待报头]^C 

root@debian:/usr# rm -rf /var/lib/apt/lists/*
root@debian:/usr# apt-get update
忽略 http://mirrors.aliyun.com jessie InRelease
获取:1 http://mirrors.aliyun.com jessie-proposed-updates InRelease [139 kB]
获取:2 http://mirrors.aliyun.com jessie Release.gpg [2,420 B]          
获取:3 http://mirrors.aliyun.com jessie Release [148 kB]               
获取:4 http://ppa.launchpad.net trusty InRelease [15.5 kB]                  
获取:5 http://mirrors.aliyun.com jessie-proposed-updates/contrib Translation-en [14 B]
获取:6 http://mirrors.aliyun.com jessie-proposed-updates/main Translation-en [167 B]
获取:7 http://mirrors.aliyun.com jessie-proposed-updates/non-free Translation-en [14 B]
获取:8 http://mirrors.aliyun.com jessie/main Sources [7,063 kB]           
获取:9 http://ppa.launchpad.net trusty/main Sources [663 B]
获取:10 http://ppa.launchpad.net trusty/main i386 Packages [1,701 B]
获取:11 http://ppa.launchpad.net trusty/main Translation-en [910 B]         
获取:12 http://mirrors.aliyun.com jessie/non-free Sources [99.2 kB]         
获取:13 http://mirrors.aliyun.com jessie/contrib Sources [50.4 kB]          
获取:14 http://mirrors.aliyun.com jessie/main i386 Packages [6,821 kB]      
获取:15 http://mirrors.aliyun.com jessie/non-free i386 Packages [79.5 kB]   
获取:16 http://mirrors.aliyun.com jessie/contrib i386 Packages [49.1 kB]    
获取:17 http://mirrors.aliyun.com jessie/contrib Translation-en [38.3 kB]   
获取:18 http://mirrors.aliyun.com jessie/main Translation-zh_CN [101 kB]    
获取:19 http://mirrors.aliyun.com jessie/main Translation-zh [1,526 B]      
获取:20 http://mirrors.aliyun.com jessie/main Translation-en [4,581 kB]     
获取:21 http://mirrors.aliyun.com jessie/non-free Translation-en [72.0 kB]  
获取:22 http://mirrors.aliyun.com jessie-proposed-updates/main Sources [1,036 B]
获取:23 http://mirrors.aliyun.com jessie-proposed-updates/non-free Sources [32 B]
获取:24 http://mirrors.aliyun.com jessie-proposed-updates/contrib Sources [32 B]
获取:25 http://mirrors.aliyun.com jessie-proposed-updates/main i386 Packages [720 B]
获取:26 http://mirrors.aliyun.com jessie-proposed-updates/non-free i386 Packages [32 B]
获取:27 http://mirrors.aliyun.com jessie-proposed-updates/contrib i386 Packages [32 B]
下载 19.3 MB,耗时 39秒 (489 kB/s)                                           
正在读取软件包列表... 完成
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值