oraios/serena · error · RuntimeError
Unsupported macOS architecture: {machine}
Error message
Unsupported macOS architecture: {machine} What it means
Raised during lua-language-server download when running on macOS with a CPU architecture outside x86_64/amd64 and arm64/aarch64, i.e. there is no matching darwin release asset. Practically this means unsupported/legacy Mac hardware or unusual emulation.
Source
Thrown at src/solidlsp/language_servers/lua_ls.py:140
lua_ls_version = lua_settings.get("lua_language_server_version", DEFAULT_LUA_LS_VERSION)
system = platform.system()
machine = platform.machine().lower()
# Map platform and architecture to download URL
if system == "Linux":
if machine in ["x86_64", "amd64"]:
download_name = f"lua-language-server-{lua_ls_version}-linux-x64.tar.gz"
elif machine in ["aarch64", "arm64"]:
download_name = f"lua-language-server-{lua_ls_version}-linux-arm64.tar.gz"
else:
raise RuntimeError(f"Unsupported Linux architecture: {machine}")
elif system == "Darwin":
if machine in ["x86_64", "amd64"]:
download_name = f"lua-language-server-{lua_ls_version}-darwin-x64.tar.gz"
elif machine in ["arm64", "aarch64"]:
download_name = f"lua-language-server-{lua_ls_version}-darwin-arm64.tar.gz"
else:
raise RuntimeError(f"Unsupported macOS architecture: {machine}")
elif system == "Windows":
if machine in ["amd64", "x86_64"]:
download_name = f"lua-language-server-{lua_ls_version}-win32-x64.zip"
else:
raise RuntimeError(f"Unsupported Windows architecture: {machine}")
else:
raise RuntimeError(f"Unsupported operating system: {system}")
download_url = f"https://github.com/LuaLS/lua-language-server/releases/download/{lua_ls_version}/{download_name}"
install_dir = _lua_ls_install_dir(LuaLanguageServer.ls_resources_dir(solidlsp_settings), lua_ls_version)
install_dir.mkdir(parents=True, exist_ok=True)
log.info("Downloading lua-language-server from %s", download_url)
archive_type = "gztar" if download_name.endswith(".tar.gz") else "zip"
FileUtils.download_and_extract_archive_verified(
download_url,
str(install_dir),View on GitHub (pinned to 7fcbca7e62)
Solutions
- Run on standard Apple Silicon (arm64) or Intel (x86_64) macOS hardware or VM
- Inside Docker on Apple Silicon, use --platform=linux/arm64 so the Linux branch (not macOS branch) resolves an asset
- Build lua-language-server from source and place it in the expected install_dir to bypass the download
- Check `uname -m` output; if it is unexpected due to emulation, run natively
Example fix
// before docker run --platform linux/amd64 ... # mismatched emulation on Apple Silicon // after docker run --platform linux/arm64 ...
Defensive patterns
Strategy: validation
Validate before calling
import platform
machine = platform.machine().lower()
if platform.system() == "Darwin" and machine not in ("x86_64", "amd64", "arm64", "aarch64"):
raise SystemExit(f"lua-language-server has no prebuilt darwin binary for {machine}") Try / catch
try:
server = create_lua_server()
except RuntimeError as e:
if "Unsupported macOS architecture" in str(e):
use_source_built_or_homebrew_binary()
else:
raise Prevention
- Run on standard Apple Silicon or Intel Macs
- Verify `uname -m` under Rosetta/emulation matches expectations
- Prefer Homebrew's lua-language-server when available as a fallback
- Avoid nested platform-emulated containers on macOS hosts
When it happens
Trigger: Calling _download_lua_ls on macOS where platform.machine() returns e.g. i386, powerpc, or an unexpected emulated value under Rosetta/QEMU with odd machine strings.
Common situations: Old Intel-32-bit Hackintosh/VM setups, CI runners with exotic virtualization reporting nonstandard machine values, cross-arch Docker-on-Mac containers leaking a nonstandard uname.
Related errors
- Unsupported Linux architecture: {machine}
- Unsupported Windows architecture: {machine}
- Unsupported operating system: {system}
- Unsupported Linux architecture: {machine}. luau-lsp only pro
- Failed to find lua-language-server executable after extracti
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/3458df795f275517.
Report an issue: GitHub.