16.04 sudo更新总是给Clearsigned文件无效,得到'NOSPLIT'( 网络是否需要身份验证)?

分享于 

4分钟阅读

ubuntu

  繁體

问题

当我尝试sudo apt update,得到以下输出:


$ sudo apt update


Get:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease [2,847 B]


Err:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease 


Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)


Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [2,854 B] 


Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease 


...


Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [2,855 B] 


Err:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease


...


Get:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease [2,857 B]


Err:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease


Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)


Fetched 11.4 kB in 0s (18.3 kB/s)


Reading package lists... Done


E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)


...


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



但是当我 wget http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease 我得到了这个输出:


2017-04-01 05:34:57 http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease


Resolving in.archive.ubuntu.com (in.archive.ubuntu.com)... 91.189.88.162, 91.189.88.149, 91.189.88.152, ...


Connecting to in.archive.ubuntu.com (in.archive.ubuntu.com)|91.189.88.162|:80... connected.


HTTP request sent, awaiting response... 200 OK


Length: 246846 (241K)


Saving to: 'InRelease.3'



InRelease.3 100%[===================>] 241.06K 110KB/s in 2.2s 



2017-04-01 05:35:00 (110 KB/s) - 'InRelease.3' saved [246846/246846]



  • wget -SO /dev/null http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease

  • wget -SO /dev/null http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease


  • 答案1

    我也有同样的问题,apt-get uses /etc/apt/apt.conf可用于代理设置,使apt.conf匹配浏览器代理设置解决了这个问题。

    
    /etc/apt$ cat apt.conf
    
    
    
    Acquire::http::proxy"http://<proxy>";
    
    
    Acquire::https::proxy"https://<proxy>";
    
    
    Acquire::ftp::proxy"ftp://<proxy>";
    
    
    Acquire::socks::proxy"socks:<proxy>";
    
    
    
    

    答案2

    这是我们大学网络的问题,问题仍然存在,其他WiFi网络工作正常。


    答案3

    当你发出这样的命令时,首先要确保DNS能够解析链接,我认为是这个问题。

    
    sudo vim /etc/resolv.conf
    
    
    
    

    确保使用google dns:

     
    nameserver 8.8.8.8
    
    
    
    

    重新启动networking.service



    文件  network  auth  Require  清除  APT  
    相关文章