Skip to content

[dev env] Devcontainer setup fails on Apple Silicon (arm64) because gcc-multilib / g++-multilib are unavailable #1216

@dotWee

Description

@dotWee

When creating the devcontainer on M-series Macs (arm64), .devcontainer/install-deps.sh fails during apt-get install because it unconditionally installs gcc-multilib and g++-multilib, which are not available in apt arm64/aarch64 repos.

This blocks devcontainer-based development on Apple Silicon without using Rosetta/emulation.

Environment

  • Host: Apple Silicon MacBook (any M-series)

  • Container base: Ubuntu (Noble)

  • Arch inside container: arm64 / aarch64

    dotwee@macbook ~ % docker run --rm -it ubuntu uname -m
    aarch64
  • Devcontainer config: .devcontainer/docker/devcontainer.json

  • Bootstrap script: .devcontainer/install-deps.sh

Reproduction

  1. Open repo in Dev Containers on an Apple Silicon Mac.
  2. Let onCreateCommand run .devcontainer/install-deps.sh.
  3. Observe apt failure for multilib packages.

Actual result

Devcontainer creation fails with:

  • E: Unable to locate package g++-multilib
  • E: Package 'gcc-multilib' has no installation candidate

Log for reference:

...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package gcc-multilib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package g++-multilib
E: Couldn't find any package by regex 'g++-multilib'
E: Package 'gcc-multilib' has no installation candidate

Expected result

Well, the devcontainer should initialize successfully on both amd64 and arm64.

Root cause

gcc-multilib and g++-multilib are x86-oriented packages and are not published for Ubuntu arm64 in this setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions