{"record":{"id":"b480cc919621fd50","repo":"denoland/deno","slug":"no-debian-architecture-mapping-for-arch-other","errorCode":null,"errorMessage":"No Debian architecture mapping for arch '{other}'; supported: x86_64, aarch64","messagePattern":"No Debian architecture mapping for arch '(.+?)'; supported: x86_64, aarch64","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/desktop.rs","lineNumber":3918,"sourceCode":"      \"deno.json `version` \\\"{version}\\\" cannot be used as a Debian/RPM package version: the character '{c}' is not allowed (only alphanumerics, '.', '+', '-' and '~')\"\n    );\n  }\n  Ok(version.replace('-', \"~\"))\n}\n\n/// Map a target triple (or the host arch when `target` is None) to a Debian\n/// architecture name. Debian arch names differ from the triple's leading\n/// component (`x86_64` → `amd64`, `aarch64` → `arm64`).\nfn debian_arch_for_target(\n  target: Option<&str>,\n) -> Result<&'static str, AnyError> {\n  let arch = target\n    .and_then(|t| t.split('-').next())\n    .unwrap_or(std::env::consts::ARCH);\n  match arch {\n    \"x86_64\" => Ok(\"amd64\"),\n    \"aarch64\" => Ok(\"arm64\"),\n    other => bail!(\n      \"No Debian architecture mapping for arch '{other}'; supported: x86_64, aarch64\"\n    ),\n  }\n}\n\n/// Map a target triple (or the host arch) to an RPM architecture name. RPM\n/// keeps the triple's arch names (`x86_64`, `aarch64`).\nfn rpm_arch_for_target(target: Option<&str>) -> Result<&'static str, AnyError> {\n  let arch = target\n    .and_then(|t| t.split('-').next())\n    .unwrap_or(std::env::consts::ARCH);\n  match arch {\n    \"x86_64\" => Ok(\"x86_64\"),\n    \"aarch64\" => Ok(\"aarch64\"),\n    other => bail!(\n      \"No RPM architecture mapping for arch '{other}'; supported: x86_64, aarch64\"\n    ),\n  }","sourceCodeStart":3900,"sourceCodeEnd":3936,"githubUrl":"https://github.com/denoland/deno/blob/f7822238cab635a3a19f99f493f675fa81a7f9d8/cli/tools/desktop.rs#L3900-L3936","documentation":"Debian (.deb) packaging needs the Debian architecture name, which differs from the target triple's arch component (x86_64 -> amd64, aarch64 -> arm64). Only those two mappings exist; any other leading triple component — or an unusual host arch when --target is omitted — bails.","triggerScenarios":"`deno desktop` building a .deb with --target whose arch component isn't x86_64 or aarch64 (e.g. armv7-*, i686-*), or no --target on a host of another arch.","commonSituations":"Cross-packaging for ARM SBCs or 32-bit systems from CI; building on niche-arch hosts without an explicit target.","solutions":["Target a supported triple: x86_64-unknown-linux-gnu (-> amd64) or aarch64-unknown-linux-gnu (-> arm64).","Always pass --target explicitly in CI so packaging doesn't depend on the runner's arch.","For unsupported arches, skip the deb format and ship a tarball."],"exampleFix":"# before\ndeno desktop --target i686-unknown-linux-gnu --deb\n\n# after\ndeno desktop --target x86_64-unknown-linux-gnu --deb","handlingStrategy":"validation","validationCode":"case \"${TARGET%%-*}\" in\n  x86_64|aarch64) ;;\n  *) echo \"deb packaging supports x86_64 (amd64) and aarch64 (arm64) only\"; exit 1 ;;\nesac","typeGuard":"function isSupportedDebArch(target: string): boolean {\n  const a = target.split(\"-\")[0];\n  return a === \"x86_64\" || a === \"aarch64\";\n}","tryCatchPattern":null,"preventionTips":["Set --target explicitly for .deb builds so arch never silently follows the host.","Document the amd64/arm64 mapping in release docs to avoid guessing triple names."],"tags":["desktop","linux","deb","architecture","packaging"],"backgroundTag":"unsupported-target-arch","analyzedSha":"f7822238cab635a3a19f99f493f675fa81a7f9d8","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}