`lzma_read: Read error (7)` from apt-get update

I noticed an error when I run $ sudo apt-get update involving https://repo.puri.sm/pureos amber/main amd64 Packages. Is this something I can fix or is this a repository issue?

$ sudo apt-get update
Ign:1 http://dl.google.com/linux/earth/deb stable InRelease
Hit:2 http://dl.google.com/linux/earth/deb stable Release                   
Hit:3 https://updates.signal.org/desktop/apt xenial InRelease               
Get:5 https://repo.puri.sm/pureos amber InRelease [5,784 B]
Get:6 https://repo.puri.sm/pureos amber/main Translation-en [5,753 kB]
Get:6 https://repo.puri.sm/pureos amber/main Translation-en [5,753 kB]
Hit:9 https://repo.puri.sm/pureos amber/main amd64 Packages
Ign:9 https://repo.puri.sm/pureos amber/main amd64 Packages
Hit:6 https://repo.puri.sm/pureos amber/main Translation-en
Ign:6 https://repo.puri.sm/pureos amber/main Translation-en
Hit:10 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Ign:10 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Err:9 https://repo.puri.sm/pureos amber/main amd64 Packages
  lzma_read: Read error (7)
Get:6 https://repo.puri.sm/pureos amber/main Translation-en [28.8 MB]
Ign:6 https://repo.puri.sm/pureos amber/main Translation-en
Fetched 5,784 B in 3s (1,898 B/s)
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/earth/deb stable InRelease' doesn't support architecture 'i386'
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://repo.puri.sm/pureos amber InRelease' doesn't support architecture 'i386'
E: Failed to fetch https://repo.puri.sm/pureos/dists/amber/main/binary-amd64/Packages  lzma_read: Read error (7)
E: Some index files failed to download. They have been ignored, or old ones used instead.

My /etc/sources.list is: (20200103T0925Z edit: It’s actually /etc/apt/sources.list. Derp.)

deb https://repo.puri.sm/pureos amber main

That seems like a short sources.list. Should there be more entries?

Thanks.

You can try to run

sudo apt-get clean

in order to clean up apt-get. Also, you can try to run the newer apt by running

sudo apt update

with a

sudo apt clean

beforehand in case it throws an error. My sources.list includes, from the purism side:

deb https://repo.pureos.net/pureos/ amber main
deb https://repo.puri.sm/pureos amber main
deb https://repo.pureos.net/pureos/ amber-security main
deb https://repo.pureos.net/pureos/ amber-updates main

I suspect the first two are redundant? Hope this helps!

1 Like

Don’t know what /etc/sources.list is for. Usually it is /etc/apt/sources.list
Also, don’t see a reference to dl.google.com in this file.

The errors reported by apt are a consequence of enabling i386 arch in apt config.
repo.puri.sm/pureos does not contain it, and apparently dl.google.com/linux/earth/deb neither.

Sorry, I meant /etc/apt/sources.list.

I did try to see if I could install steam on my machine at one point and I think I remember that was when I started to see “i386” errors appear. I’ll look up to see how I can disable the “i386 arch in apt config”.

Thanks!

Edit (20200103T0939Z):

I think this i386 business came from when I tried to install Steam from onto my Librem 15 version 3. I probably ran something like $ sudo dpkg -i steam_latest.deb on the installer from https://store.steampowered.com/linux. I didn’t get Steam running since I decided halfway through installation to stop (or I got confused) and probably ran something like $ sudo apt remove steam-launcher and $ sudo apt purge steam-launcher.

Anyway, following some guidance at “https://wiki.debian.org/Multiarch/HOWTO” I ran $ sudo dpkg --remove-architecture i386 after seeing i386 printed after running $ dpkg --print-foreign-architectures. The i386 errors have disappeared but the lzma_read: Read error (7) still persists.:

$ dpkg --print-foreign-architectures 
i386
$ sudo dpkg --remove
--remove               --remove-architecture
$ sudo dpkg --remove-architecture i386
$ sudo apt-get update
Ign:1 http://dl.google.com/linux/earth/deb stable InRelease
Hit:2 http://dl.google.com/linux/earth/deb stable Release                                                
Hit:3 https://updates.signal.org/desktop/apt xenial InRelease                                                             
Get:5 https://repo.puri.sm/pureos amber InRelease [5,784 B]                                                               
Get:6 https://repo.puri.sm/pureos amber/main Translation-en [5,753 kB]
Get:6 https://repo.puri.sm/pureos amber/main Translation-en [5,753 kB]
Hit:9 https://repo.puri.sm/pureos amber/main amd64 Packages
Ign:9 https://repo.puri.sm/pureos amber/main amd64 Packages
Hit:6 https://repo.puri.sm/pureos amber/main Translation-en
Hit:10 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Ign:6 https://repo.puri.sm/pureos amber/main Translation-en
Ign:10 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Err:9 https://repo.puri.sm/pureos amber/main amd64 Packages   
  lzma_read: Read error (7)
Get:6 https://repo.puri.sm/pureos amber/main Translation-en [28.8 MB]
Ign:6 https://repo.puri.sm/pureos amber/main Translation-en
Reading package lists... Done
E: Failed to fetch https://repo.puri.sm/pureos/dists/amber/main/binary-amd64/Packages  lzma_read: Read error (7)
E: Some index files failed to download. They have been ignored, or old ones used instead.

Thanks for any direction you can give.

I tried

$ sudo apt-get clean

and

$ sudo apt update

and the result looks the same as before:

Ign:1 http://dl.google.com/linux/earth/deb stable InRelease
Hit:2 http://dl.google.com/linux/earth/deb stable Release                                                                 
Hit:3 https://updates.signal.org/desktop/apt xenial InRelease                                                             
Get:5 https://repo.puri.sm/pureos amber InRelease [5,784 B]           
Hit:6 https://repo.puri.sm/pureos amber/main amd64 Packages
Ign:6 https://repo.puri.sm/pureos amber/main amd64 Packages
Hit:7 https://repo.puri.sm/pureos amber/main Translation-en
Hit:8 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Ign:7 https://repo.puri.sm/pureos amber/main Translation-en
Ign:8 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Hit:9 https://repo.puri.sm/pureos amber/main DEP-11 48x48 Icons
Hit:10 https://repo.puri.sm/pureos amber/main DEP-11 64x64 Icons
Err:6 https://repo.puri.sm/pureos amber/main amd64 Packages
  lzma_read: Read error (7)
Ign:7 https://repo.puri.sm/pureos amber/main Translation-en
Get:8 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata [4,225 kB]
Fetched 5,784 B in 4s (1,393 B/s)                   
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/earth/deb stable InRelease' doesn't support architecture 'i386'
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://repo.puri.sm/pureos amber InRelease' doesn't support architecture 'i386'
E: Failed to fetch https://repo.puri.sm/pureos/dists/amber/main/binary-amd64/Packages  lzma_read: Read error (7)
E: Some index files failed to download. They have been ignored, or old ones used instead.

I think I’ll try to figure out Dwaff’s advice of disabling i386 arch in the apt config (whatever that means ^^;; Learning time!).

Thanks!

Check if you have any files in /etc/apt/sources.list.d/ folder, and remove them!

1 Like

I renamed the sources.list.d folder to sources.list.d-old with $ sudo mv /etc/apt/sources.list.d /etc/apt/sources.list.d-old. I’m still getting lzma error.

$ sudo apt-get update
Get:1 https://repo.puri.sm/pureos amber InRelease [5,784 B]
Get:2 https://repo.puri.sm/pureos amber/main Translation-en [5,753 kB]
Get:2 https://repo.puri.sm/pureos amber/main Translation-en [5,753 kB]
Hit:5 https://repo.puri.sm/pureos amber/main amd64 Packages
Ign:5 https://repo.puri.sm/pureos amber/main amd64 Packages
Hit:2 https://repo.puri.sm/pureos amber/main Translation-en
Hit:6 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Ign:2 https://repo.puri.sm/pureos amber/main Translation-en
Ign:6 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Err:5 https://repo.puri.sm/pureos amber/main amd64 Packages  
  lzma_read: Read error (7)
Get:2 https://repo.puri.sm/pureos amber/main Translation-en [28.8 MB]
Ign:2 https://repo.puri.sm/pureos amber/main Translation-en
Fetched 5,784 B in 3s (2,138 B/s)
Reading package lists... Done
E: Failed to fetch https://repo.puri.sm/pureos/dists/amber/main/binary-amd64/Packages  lzma_read: Read error (7)
E: Some index files failed to download. They have been ignored, or old ones used instead.

My sources.list file is just one line (which I think is how it was when I first received it):

$ cat sources.list
deb https://repo.puri.sm/pureos amber main

Is this issue worth pursuing? In other words, how important is this https://repo.puri.sm/pureos amber/main amd64 Packages thing?

The output of your apt-get update looks much cleaner now.

This indicates corrupted compressed data. Can’t say if it was out of space on your disk, some strange network error (unlikely), broken proxy server, or bad file on the repo itself. Or something entirely different…

Does the error persist? Chances are it got fixed itself over time.

It is the very OS you run. Without it, you will have no access to updates at all.

~Try this:

Sorry, I see you have already tried that…

I’m not sure what you mean by “Chances are it got fixed itself” but the error is still there.

$ sudo apt-get update
Get:1 https://repo.puri.sm/pureos amber InRelease [5,784 B]
Get:2 https://repo.puri.sm/pureos amber/main Translation-en [5,753 kB]
Get:2 https://repo.puri.sm/pureos amber/main Translation-en [5,753 kB]
Hit:5 https://repo.puri.sm/pureos amber/main amd64 Packages
Ign:5 https://repo.puri.sm/pureos amber/main amd64 Packages
Hit:2 https://repo.puri.sm/pureos amber/main Translation-en
Hit:6 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Ign:2 https://repo.puri.sm/pureos amber/main Translation-en
Ign:6 https://repo.puri.sm/pureos amber/main amd64 DEP-11 Metadata
Err:5 https://repo.puri.sm/pureos amber/main amd64 Packages  
  lzma_read: Read error (7)
Get:2 https://repo.puri.sm/pureos amber/main Translation-en [28.8 MB]
Ign:2 https://repo.puri.sm/pureos amber/main Translation-en
Reading package lists... Done
E: Failed to fetch https://repo.puri.sm/pureos/dists/amber/main/binary-amd64/Packages  lzma_read: Read error (7)
E: Some index files failed to download. They have been ignored, or old ones used instead.

Since I don’t hear anyone else saying they have this lzma_read: Read error problem then I suspect it’s a problem I brought upon myself. I’m reinstalling the operating system. Thanks for your help!

You may want to clean out the /var/lib/apt/lists directory before you re-install.

2 Likes

I went through the same issue and @jeremiah’s fix worked for me!
See https://tracker.pureos.net/T940

2 Likes

Helped me as well. Thanks a lot!

Same! Thank you!

Does anyone know a bit about what this /var/lib/apt/lists directory is all about? Why is it safe to just blow it away?