Tag Archives: Failed to fetch

[Solved] Ubuntu sudo apt-get update Warning: Failed to fetch

question:

Execute sudo apt get update prompt: failed to fetch

chen@ubuntu:~/soft/Python-2.7.12$ sudo apt-get update
Get:1 http://ppa.launchpad.net/fkrull/deadsnakes-python2.7/ubuntu xenial InRelease [2,281 B]
Err:1 http://ppa.launchpad.net/fkrull/deadsnakes-python2.7/ubuntu xenial InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Fetched 2,281 B in 0s (4,524 B/s)    
Reading package lists... Done
E: Failed to fetch http://ppa.launchpad.net/fkrull/deadsnakes-python2.7/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.

But at the end of December 25311, it was 35775 on the desk. http://ppa.launchpad.net/fkrull/deadsnakes-python2.7/ubuntu It’s possible.

1, 21024;

echosudorm -rf /var/lib/apt/lists

2, 21024;, except all sources

3, renewable

sudo vi /etc/apt/sources.list

Photo from 163s

deb http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse

View source

IV. Testing

Again sudo apt-get update

The prompt is as follows.

guchen@ubuntu:~/soft/Python-2.7.12$ sudo apt-get update
Get:1 http://mirrors.163.com/ubuntu xenial InRelease [2,281 B]
Get:2 http://mirrors.163.com/ubuntu xenial-security InRelease [2,281 B]
Err:1 http://mirrors.163.com/ubuntu xenial InRelease                                
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Err:2 http://mirrors.163.com/ubuntu xenial-security InRelease                       
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:3 http://mirrors.163.com/ubuntu xenial-updates InRelease [2,281 B]              
Err:3 http://mirrors.163.com/ubuntu xenial-updates InRelease                  
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:4 http://mirrors.163.com/ubuntu xenial-proposed InRelease [2,281 B]       
Err:4 http://mirrors.163.com/ubuntu xenial-proposed InRelease                       
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:5 http://mirrors.163.com/ubuntu xenial-backports InRelease [2,281 B]            
Err:5 http://mirrors.163.com/ubuntu xenial-backports InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Fetched 9,124 B in 0s (19.8 kB/s)
Reading package lists... Done
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial-security/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial-updates/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial-proposed/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial-backports/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.

V. Switching authentication

How come you are still prompted: does the network require authentication?

Need permission?

Solution: Change the Authentication in software$updates to try

.

VI. Success

One final execution.

sudo apt-get clean

sudo apt-get update

guchen@ubuntu:~/soft/Python-2.7.12$ sudo apt-get update
Get:1 http://mirrors.163.com/ubuntu xenial InRelease [247 kB]
Get:2 http://mirrors.163.com/ubuntu xenial-security InRelease [107 kB]
Get:3 http://mirrors.163.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://mirrors.163.com/ubuntu xenial-proposed InRelease [260 kB]
Get:5 http://mirrors.163.com/ubuntu xenial-backports InRelease [107 kB]
Get:6 http://mirrors.163.com/ubuntu xenial/main Sources [868 kB]
Get:7 http://mirrors.163.com/ubuntu xenial/restricted Sources [4,808 B]
Get:8 http://mirrors.163.com/ubuntu xenial/universe Sources [7,728 kB]
Get:9 http://mirrors.163.com/ubuntu xenial/multiverse Sources [179 kB]            
Get:10 http://mirrors.163.com/ubuntu xenial/main amd64 Packages [1,201 kB]
Get:11 http://mirrors.163.com/ubuntu xenial/main i386 Packages [1,196 kB]
Get:12 http://mirrors.163.com/ubuntu xenial/main Translation-en [568 kB]
Get:13 http://mirrors.163.com/ubuntu xenial/main amd64 DEP-11 Metadata [733 kB]
Get:14 http://mirrors.163.com/ubuntu xenial/main DEP-11 64x64 Icons [409 kB]
Get:15 http://mirrors.163.com/ubuntu xenial/restricted amd64 Packages [8,344 B]
Get:16 http://mirrors.163.com/ubuntu xenial/restricted i386 Packages [8,684 B]
Get:17 http://mirrors.163.com/ubuntu xenial/restricted Translation-en [2,908 B]
Get:18 http://mirrors.163.com/ubuntu xenial/restricted amd64 DEP-11 Metadata [186 B]
Get:19 http://mirrors.163.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
Get:102 http://mirrors.163.com/ubuntu xenial-backports/universe DEP-11 64x64 Icons [1,789 B]                                                                                                                                                    
Get:103 http://mirrors.163.com/ubuntu xenial-backports/multiverse amd64 DEP-11 Metadata [216 B]                                                                                                                                                 
Get:104 http://mirrors.163.com/ubuntu xenial-backports/multiverse DEP-11 64x64 Icons [29 B]                                                                                                                                                     
Fetched 53.4 MB in 18s (2,849 kB/s)                                                                                                                                                                                                             
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done

finally set

227919;

Set the best DNS

sudo vi/etc/resolv.conf

added to the list

nameserver 8.8.8.8

Weightlaunching 32476;

sudo service networking restart