Arch Linux: pacman – error “HTTP server doesn’t seem to support byte ranges”

By | 05/30/2022

During system upgrade with pacman -Syu, I got internet disruption, and on the next upgrade I got the error from pacman.

It sounds like “HTTP server doesn’t seem to support byte ranges. Cannot resume“:

[simterm]

...
==> Retrieving sources...
  -> Downloading clightd-5.6.tar.gz...
** Resuming transfer from byte position 12288
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   129  100   129    0     0    523      0 --:--:-- --:--:-- --:--:--   524
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
==> ERROR: Failure while downloading https://github.com/FedeDP/Clightd/archive/5.6.tar.gz
    Aborting...
 -> error making: clightd
...

[/simterm]

Actually, we can see that there is a problem with the Clightd/archive/5.6.tar.gz file, so let’s try to find it on your system, where it must be saved in a cache directory:

[simterm]

$ find /home/ -name clightd-5.6.tar.gz*
/home/setevoy/.cache/yay/clightd/clightd-5.6.tar.gz.part

[/simterm]

Aha, here it is!

Pay attention to the .part extension on the end of the file’s name – it just wasn’t fully downloaded.

So, to solve the issue, just clean up your local cache:

[simterm]

$ yay -Scc

Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] y
removing all files from cache...

Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] 
removing unused sync repositories...

Build directory: /home/setevoy/.cache/yay
==> Do you want to remove ALL AUR packages from cache? [Y/n] 
removing AUR packages from cache...

[/simterm]

And run the upgrade again:

[simterm]

$ yay -Syu --noconfirm

[/simterm]

Done.