{"record":{"id":"d9db2eec114c83c0","repo":"tursodatabase/turso","slug":"arm64-architecture-is-not-supported-on-linux-yet","errorCode":null,"errorMessage":"ARM64 architecture is not supported on Linux yet","messagePattern":"ARM64 architecture is not supported on Linux yet","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"critical","filePath":"bindings/java/src/main/java/tech/turso/core/TursoDB.java","lineNumber":71,"sourceCode":"      this.fileExtension = fileExtension;\n    }\n\n    public String getLibPath() {\n      return libPath;\n    }\n\n    public String getFileExtension() {\n      return fileExtension;\n    }\n\n    public static Architecture detect() {\n      String osName = System.getProperty(\"os.name\").toLowerCase();\n      String osArch = System.getProperty(\"os.arch\").toLowerCase();\n\n      // TODO: add support for arm64 on Linux\n      if (osName.contains(\"linux\")) {\n        if (osArch.contains(\"aarch64\") || osArch.contains(\"arm64\")) {\n          throw new UnsupportedOperationException(\n              \"ARM64 architecture is not supported on Linux yet\");\n        } else if (osArch.contains(\"x86_64\") || osArch.contains(\"amd64\")) {\n          return LINUX_X86;\n        }\n      }\n\n      if (osName.contains(\"mac\")) {\n        if (osArch.contains(\"aarch64\") || osArch.contains(\"arm64\")) {\n          return MACOS_ARM64;\n        } else if (osArch.contains(\"x86_64\") || osArch.contains(\"amd64\")) {\n          return MACOS_X86;\n        }\n      } else if (osName.contains(\"win\")) {\n        return WINDOWS;\n      }\n\n      return UNSUPPORTED;\n    }","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/tursodatabase/turso/blob/244cde92a7df7f9b8b8b7a4075c35a12977e303e/bindings/java/src/main/java/tech/turso/core/TursoDB.java#L53-L89","documentation":"TursoDB.Architecture.detect() throws UnsupportedOperationException when os.name contains 'linux' and os.arch is aarch64 or arm64. The native library is only shipped for Linux x86_64 and macOS (x86_64 and arm64), so detection refuses immediately instead of attempting to load a nonexistent artifact. Detection runs on the path that loads the native library, so the throw surfaces at the first line of code that touches TursoDB.","triggerScenarios":"Running the JVM on any Linux aarch64/arm64 host: AWS Graviton instances, GitHub Actions arm64 runners, or any container with platform linux/arm64 — which is the default platform inside Docker on Apple Silicon.","commonSituations":"docker run on an M1/M2/M3 Mac without --platform linux/amd64; deploying the jar to Graviton EC2 or ARM Lambda; CI images migrated to arm64 runners while production stays x86_64.","solutions":["Force the x86_64 image: docker run --platform linux/amd64 ... (requires qemu/binfmt support on ARM hosts)","Run the workload where natives exist: Linux x86_64 or macOS arm64/x86_64","Build the native library for linux-aarch64 and install it on the system library path so the JAR path is not needed","Track binding updates: the source carries a TODO to add Linux ARM64 support"],"exampleFix":"# before\ndocker run myapp:latest        # arm64 Linux host -> UnsupportedOperationException\n\n# after\ndocker run --platform linux/amd64 myapp:latest","handlingStrategy":"validation","validationCode":"String os = System.getProperty(\"os.name\", \"\").toLowerCase(Locale.ROOT);\nString arch = System.getProperty(\"os.arch\", \"\").toLowerCase(Locale.ROOT);\nboolean unsupportedLinuxArm = os.contains(\"linux\")\n    && (arch.contains(\"aarch64\") || arch.contains(\"arm64\"));\nif (unsupportedLinuxArm) {\n  // fail with an actionable message (or route to an x86-64 host) before touching TursoDB\n  throw new IllegalStateException(\n      \"Linux \" + arch + \" has no native library; run linux/amd64 or macOS arm64\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  TursoDB db = TursoDB.open(path);\n} catch (UnsupportedOperationException e) {\n  // Architecture.detect() refused the platform; report host details and stop\n  log.fatal(\"unsupported platform: {} / {}\",\n      System.getProperty(\"os.name\"), System.getProperty(\"os.arch\"), e);\n  throw e;\n}","preventionTips":["Pin container platforms explicitly (--platform linux/amd64) in every environment, including local dev on Apple Silicon","Run CI on the same CPU architecture as production","Smoke-test the native layer at startup so platform failures surface at boot, not on the first query"],"tags":["java","native-library","arm64","aarch64","linux","docker","platform-detection"],"backgroundTag":"unsupported-cpu-architecture","analyzedSha":"244cde92a7df7f9b8b8b7a4075c35a12977e303e","analyzedAt":"2026-08-20T07:02:18.389Z","contentChangedAt":"2026-08-20T07:02:18.389Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}