6

I am getting the following message whenever I try to run: sudo apt-get update :

pi@raspberrypi:~ $ sudo apt-get update 
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [8,084 B]
Err:1 http://archive.raspberrypi.org/debian stretch InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:2 http://mirrordirector.raspbian.org/raspbian stretch InRelease [8,084 B]
Err:2 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Fetched 16.2 kB in 0s (113 kB/s)
Reading package lists... Done
E: Failed to fetch
http://mirrordirector.raspbian.org/raspbian/dists/stretch/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/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.

My Pi is currently using Ethernet, not WiFi.

Dmitry Grigoryev
  • 26,688
  • 4
  • 44
  • 133
Sean
  • 69
  • 1
  • 1
  • 2
  • 2
    have you searched the internet for `Clearsigned file isn't valid, got 'NOSPLIT'` - edit: seems to be a "proxy" issue – Jaromanda X Jan 28 '19 at 04:03
  • 1
    @JaromandaX is likely correct. Your issue is most likely that your ISP is running a faulty proxy. [Read this Q&A for details](https://askubuntu.com/questions/474549/got-nodata-issue-nodata-does-the-network-require-authentication) – Seamus Jan 28 '19 at 13:06
  • Does one of the answers help you? If so it would be nice if you could accept one to finish your question. – Ingo Apr 05 '19 at 10:57

2 Answers2

18

I assume you are using Raspbian. It could be that your installation lists are broken. I suggest to reinitialize them by editing sources.list and raspi.list. By default they look like this:

rpi ~$ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

rpi ~$ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui

In both files comment the first line with a # and any additional repository if present. Then do:

rpi ~$ sudo apt update

This will clear the lists from apt in /var/lib/apt/lists/. It it nearly then same by doing sudo rm /var/lib/apt/lists/* and sudo rm /var/lib/apt/lists/partial/* but under control of the packet manager. Then uncomment the lines you have commented and do:

rpi ~$ sudo apt update
rpi ~$ sudo apt full-upgrade
Ingo
  • 40,606
  • 15
  • 76
  • 189
1

You seem to have a network connection which provides Internet access via a proxy. If you can browse the web, check your browser settings to see what the proxy is. Otherwise ask someone in charge of the network.

Once you know the proxy name, port and optionally username and password, set it up on your RPi either via /etc/apt/apt.conf or using environment variables such as $http_proxy. Check out this Q&A for syntax.

Dmitry Grigoryev
  • 26,688
  • 4
  • 44
  • 133