I was trying to update my RPI. $sudo apt-get update
, and this was my result:
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
I later triedsudo apt-get update
(no $ sign this time), and the result was:
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Err:1 http://archive.raspberrypi.org/debian buster InRelease
Splitting up /var/lib/apt/lists/archive.raspberrypi.org_debian_dists_buster_InRelease into data and signature failed
Err:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Splitting up /var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_buster_InRelease into data and signature failed
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.raspberrypi.org/debian buster InRelease: Splitting up /var/lib/apt/lists/archive.raspberrypi.org_debian_dists_buster_InRelease into data and signature failed
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://raspbian.raspberrypi.org/raspbian buster InRelease: Splitting up /var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_buster_InRelease into data and signature failed
W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease Splitting up /var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_buster_InRelease into data and signature failed
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease Splitting up /var/lib/apt/lists/archive.raspberrypi.org_debian_dists_buster_InRelease into data and signature failed
W: Some index files failed to download. They have been ignored, or old ones used instead.
Then, I did sudo apt update
and this is the result:
Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Err:1 http://archive.raspberrypi.org/debian buster InRelease
Error writing to output file - write (28: No space left on device) [IP: 46.235.230.122 80]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Err:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Error writing to output file - write (28: No space left on device) [IP: 93.93.128.193 80]
Reading package lists... Done
Building dependency tree
Reading state information... Done
311 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease Error writing to output file - write (28: No space left on device) [IP: 93.93.128.193 80]
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease Error writing to output file - write (28: No space left on device) [IP: 46.235.230.122 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Is there anything I can do to fix this?
sudo apt-get update
... or alternatively,sudo apt update
sudo
- that's exactly the error I get when doing so - because assudo
is not an environment variable, running$sudo apt-get update
is identical to runningapt-get update
- in fact, you could do$someRandomStringOfLetters apt-get update
and get the same problem - so, the first mystery is solved - please try runningsudo apt-get update
orsudo apt update
againping -c3 archive.raspberrypi.org
and get a working response? It looks like you may have network connectivity problems (now that you've solved your$sudo
vssudo
struggles).