Error installing x86-64 Arch in OrbStack on Apple Silicon
Fresh x86-64 Arch Linux VM created in OrbStack on a 2021 M1 Pro MacBook Pro. First thing I did was run the DetSys Nix installer and got this error:
Error
Error:
0: Install failure
1: Error executing action
2: Action `configure_nix` errored
3: Action `setup_default_profile` errored
4: Failed to execute command with status 1 `HOME="/root" NIX_SSL_CERT_FILE="/nix/store/47h1qcdfp2gp7qlzpa41zgmg6drvmrkz-nss-cacert-3.95/etc/ssl/certs/ca-bundle.crt" "/nix/store/00dc6iygj63mjcmixki1vwg7m1jbdi9p-nix-2.21.2/bin/nix-env" "-i" "/nix/store/00dc6iygj63mjcmixki1vwg7m1jbdi9p-nix-2.21.2"`, stdout:
stderr: installing 'nix-2.21.2'
error:
… while setting up the build environment
error: unable to load seccomp BPF program: Invalid argument
Metadata
| key | value |
|---|---|
| version | 0.19.0 |
| os | linux |
| arch | x86_64 |
Here's some more system info:
[evanrelf@arch-x86 ~]$ uname -a
Linux arch-x86 6.9.8-orbstack-00170-g7b4100b7ced4 #1 SMP Thu Jul 11 03:32:20 UTC 2024 x86_64 GNU/Linux
Using OrbStack version 1.6.4 (17192).
Just verified the install works perfect when using the aarch64 Arch Linux in OrbStack, and fails in the exact same way with x86-64 Ubuntu 24.04. So probably something to do with x86-64, maybe related to Rosetta?
You might try this suggestion in a similar issue: https://github.com/DeterminateSystems/nix-installer/issues/955#issuecomment-2099655058
Oops, sorry for the dupe! Thanks, will try that later today 👍
Didn't get around to it until now, but I'm happy to confirm that adding --extra-conf='filter-syscalls = false' as suggested here worked!
Would be awesome if this was detected automatically.
If you know of a way to detect running under OrbStack, I'm all ears!
I don't know of any official guidance for how best to detect that you're running under OrbStack, but there are lots of signs inside the Linux VM!
- The
orbandorbctlexecutables are in thePATH, and located under/opt/orbstack-guest/bin. - The kernel release (
uname -r) has the stringorbstackin it. - The host filesystem is mounted at
/mnt/mac.