Charmcraft pack crashed with `cannot install all requested build packages`
Metadata
Current evaluation
Transient Ubuntu archive outage (HTTP 404 fetching zlib1g_1.2.11) made apt fail inside the build container; retry after `charmcraft clean` succeeded. Maintainer facundobatista closed it as out of charmcraft's control, asking for recurring logs.
Resolution: closed not a bug
Reason: Maintainer facundobatista closed the report on 2022-05-30 after the log showed `E: Failed to fetch http://archive.ubuntu.com/.../zlib1g_1.2.11.dfsg-2ubuntu1.2_amd64.deb 404 Not Found`, i.e. a network/archive glitch rather than a charmcraft defect; no code change was made and he invited reopening if it recurs. A second reporter (twovican) saw the same symptom, attributing it to stale LXD containers.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I got this error message, went away after charmcraft clean. Curiously I had never packed this specific charm before, so I'm not sure what was there to be cleaned...
```bash
❯ charmcraft pack
Packing the charm
Parts processing error: Cannot install all requested build packages: libexpat1-dev=2.2.9-1build1, libpytho
n3-dev=3.8.2-0ubuntu2, libpython3.8=3.8.10-0ubuntu1~20.04.2, libpython3.8-dev=3.8.10-0ubuntu1~20.04.2, pyt
hon-pip-whl=20.0.2-5ubuntu1.6, python3-dev=3.8.2-0ubuntu2, python3-distutils=3.8.10-0ubuntu1~20.04, python
3-lib2to3=3.8.10-0ubuntu1~20.04, python3-pip=20.0.2-5ubuntu1.6, python3-pkg-resources=45.2.0-1, python3-se
tuptools=45.2.0-1, python3-venv=3.8.2-0ubuntu2, python3-wheel=0.34.2-1, python3.8-dev=3.8.10-0ubuntu1~20.0
4.2, python3.8-venv=3.8.10-0ubuntu1~20.04.2, zlib1g-dev=1:1.2.11.dfsg-2ubuntu1.2
Full execution log: '/tmp/charmcraft.log'
Failed to build charm for bases index '0'.
Full execution log: '/home/pietro/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220414-114332.0
63980.log'
❯ charmcraft clean; charmcraft pack
Cleaned project 'traefik-mock'.
Packing the charm
Created 'traefik-mock_ubuntu-20.04-amd64.charm'.
Charms packed:
traefik-mock_ubuntu-20.04-amd64.charm
```
[charmcraft-20220414-114332.063980.log](https://github.com/canonical/charmcraft/files/8488176/charmcraft-20220414-114332.063980.log)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed not a bug | Transient Ubuntu archive outage (HTTP 404 fetching zlib1g_1.2.11) made apt fail inside the build container; retry after `charmcraft clean` succeeded. Maintainer facundobatista closed it as out of charmcraft's control, asking for recurring logs. | |
| stealth/space-bunny-alpha | — | closed not a bug | Closed as a transient external failure: Ubuntu archive returned HTTP 404 for zlib1g, blocking apt; the retry after charmcraft clean succeeded. | |
| stealth/space-bunny-alpha | — | closed not a bug | Closed as a transient Ubuntu archive failure: apt received a 404 for zlib1g. A retry succeeded, independently of charmcraft clean. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as a non-issue. The crash resulted from a temporary Ubuntu archive 404 error. Running clean merely coincided with a successful retry. Maintainer closed the report, advising re-opening if the transient failure recurs. | |
| qwen/qwen3.6-35b-a3b | — | — | Rejected and closed as a temporary Ubuntu archive network failure causing apt package installation errors. The clean command was coincidental. Issue deemed out of charmcraft's control with no code changes. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as a temporary Ubuntu archive network glitch causing apt failures. The clean command was coincidental. Issue deemed out of charmcraft's control; maintainers advised reopening if reproducible with consecutive logs. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #815 charmcraft pack fails - connection timed out could not connect | charmcraft | closed | User-reported charmcraft pack failure was a local host/network problem (archive.ubuntu.com/security.ubuntu.com unreachable during apt cache update in the LXD build container). Author rebooted their machine and packing worked again, then self-closed the issue. | |
| #560 Charmcraft pack is giving error frequently | charmcraft | closed | The failure was traced to external LXD networking blocking access to archive.ubuntu.com during snapd installation; no Charmcraft fix was merged, and the reported firewall workaround did not help. | |
| #511 `charmcraft pack` fails running `apt update` | charmcraft | closed | Closed with no Charmcraft code change: maintainers determined the `apt update` failure came from a broken host/LXD (fan bridge) networking setup, not a Charmcraft bug; guidance posted to Charmhub Discourse and the LXD forum. | |
| #823 more transparency for container build in first charmcraft pack | charmcraft | closed | Firewall-blocked LXD setup hung `charmcraft pack` indefinitely on instance network setup. No charmcraft change needed; maintainer tracked the missing timeout in craft-providers and closed the issue. | |
| #883 Charmcraft (2.0.0) pack with build-packages failing on GitHub actions (but 2.1.0 - latest/candidate - is working) | charmcraft | closed | Charmcraft 2.0.0 failed to install build packages after a GitHub runner update; running apt-get update worked. Maintainers closed it as likely unrelated to Charmcraft. | |
| #660 `charmcraft pack` fails with error writing to lxd unix socket | charmcraft | closed | A transient LXD socket timeout stopped packing; `charmcraft clean` restored operation, the error did not recur, and the reporter closed the report without a code fix. |