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.

3
  • 2
    have you searched the internet for Clearsigned file isn't valid, got 'NOSPLIT' - edit: seems to be a "proxy" issue Jan 28, 2019 at 4: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
    – Seamus
    Jan 28, 2019 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 5, 2019 at 10:57

2 Answers 2

22

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
2
  • Worked for me. Cheers!
    – nweiler
    Mar 18, 2020 at 1:29
  • Yes. I did. Should be there.
    – nweiler
    Mar 18, 2020 at 15:50
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.