# HF spaces build - systematic apt error across different spaces

**URL:** <https://discuss.huggingface.co/t/hf-spaces-build-systematic-apt-error-across-different-spaces/174028>\
**Category:** Spaces\
**Created:** [March 5, 2026, 5:33pm UTC](https://discuss.huggingface.co/t/hf-spaces-build-systematic-apt-error-across-different-spaces/174028 "2026-03-05T17:33:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![apehex](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/apehex/32/58389_2.png) [@apehex](https://discuss.huggingface.co/u/apehex)\
**Post date:** [March 5, 2026, 5:33pm UTC](https://discuss.huggingface.co/t/hf-spaces-build-systematic-apt-error-across-different-spaces/174028/1 "2026-03-05T17:33:44Z")

</div>

Hey there! 👾

First, thanks for developping such an awesome stack, from `transformers` to `gradio`!

I’ve had an issue today on several gradio spaces that were building without errors before.

Near the end of the build process, after installing the python deps, when running the `apt` update:

```auto
--> RUN apt-get update && apt-get install -y htop vim nano gdb && rm -rf /var/lib/apt/lists/*
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 Packages [8792 kB]
Get:6 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [6924 B]
Get:7 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [293 kB]
Get:8 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages [13.7 kB]
Err:8 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
  File has unexpected size (13622 != 13677). Mirror sync in progress? [IP: 104.20.45.190 443]
  Hashes of expected file:
   - Filesize:13677 [weak]
   - SHA512:3f746797398d968b69fcc1c3974947366d0677d5d54dde38f6f6ea6c7f667cfcb2ef43faf2dabd8f03e773906ec27436020ec6cf03bf8338ba550bafbdb7ca4a
   - SHA256:f1a08214fef665f12d8a0880b7d9bc4115b918b33c102c6fe29865a07eb3cdeb
   - SHA1:b0ba202ca989a6cc50743339482f90ad1fcf06c2 [weak]
   - MD5Sum:629f7da7c22506638f9e3ebb378dd211 [weak]
  Release file created at: Thu, 05 Mar 2026 16:15:32 +0000
Fetched 9358 kB in 1s (9835 kB/s)
Reading package lists...
E: Failed to fetch https://deb.nodesource.com/node_20.x/dists/nodistro/main/binary-amd64/Packages.bz2 File has unexpected size (13622 != 13677). Mirror sync in progress? [IP: 104.20.45.190 443]
   Hashes of expected file:
    - Filesize:13677 [weak]
    - SHA512:3f746797398d968b69fcc1c3974947366d0677d5d54dde38f6f6ea6c7f667cfcb2ef43faf2dabd8f03e773906ec27436020ec6cf03bf8338ba550bafbdb7ca4a
    - SHA256:f1a08214fef665f12d8a0880b7d9bc4115b918b33c102c6fe29865a07eb3cdeb
    - SHA1:b0ba202ca989a6cc50743339482f90ad1fcf06c2 [weak]
    - MD5Sum:629f7da7c22506638f9e3ebb378dd211 [weak]
   Release file created at: Thu, 05 Mar 2026 16:15:32 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

--> ERROR: process "/bin/sh -c apt-get update && apt-get install -y htop vim nano gdb && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

```

Apparently the distribution file for `node_20.x` is somehow corrupted.

This happens on all the spaces I tried to rebuild in the last couple hours, for example:

> **[Attention Scores - a Hugging Face Space by apehex](https://huggingface.co/spaces/apehex/attention-scores?logs=build)**
>
> Display the influence of each token on the prediction.

Voilà voilà, GL with this one! 🥲

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 6, 2026, 12:23am UTC](https://discuss.huggingface.co/t/hf-spaces-build-systematic-apt-error-across-different-spaces/174028/2 "2026-03-06T00:23:55Z")

</div>

After duplicating the Space, it built successfully and started running.

Probably some cache on the HF side is corrupted, so try factory rebuild → change the `sdk:` in `README.md` and revert → rebuild with an empty commit, etc.

Also, Python’s version has been changed from the default 3.10 to 3.13 at some point. If you want it to work as before, specify `python_version: "3.10"` in `README.md`.

---

<div class="post-metadata">

**Author:** ![apehex](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/apehex/32/58389_2.png) [@apehex](https://discuss.huggingface.co/u/apehex)\
**Post date:** [March 6, 2026, 7:53am UTC](https://discuss.huggingface.co/t/hf-spaces-build-systematic-apt-error-across-different-spaces/174028/3 "2026-03-06T07:53:25Z")

</div>

Thanks, it works! 😃
