Add native binary support for linux/riscv64

Status Closed — not planned
Reported on v2.1.143
Maintainer reply None cached
Activity 6 comments · opened May 16, 2026 · closed Aug 27, 2026

Feature Request: Native binary for Linux RISC-V (riscv64)

Summary

Claude Code cannot run on Linux riscv64 platforms because the native binary is only distributed for x86_64 and arm64. There is no @anthropic-ai/claude-code-linux-riscv64 optional dependency.

Platform

  • Board: Orange Pi RV2 (SpacemiT X60/K1 SoC, 8-core RISC-V)
  • OS: Ubuntu 24.04 Noble (riscv64)
  • Node.js: v18.19.1 (riscv64, installed from apt)
  • Claude Code: 2.1.143

Current behavior

$ npm install -g @anthropic-ai/claude-code
$ claude --version
Error: claude native binary not installed.

Either postinstall did not run (--ignore-scripts, some pnpm configs)
or the platform-native optional dependency was not downloaded
(--omit=optional).

The npm package installs successfully, Node.js runs fine, but the postinstall script finds no matching platform binary for linux-riscv64.

Workaround attempted

Tried running the linux-arm64 binary via QEMU user-mode emulation (qemu-user-static + binfmt-support). The binary (233MB Bun-compiled executable) never completes initialization within 120 seconds due to the overhead of emulating arm64 JIT code on RISC-V hardware.

Why this matters

RISC-V is a growing platform for edge computing and AI inference workloads. The SpacemiT K1 SoC (used in boards like Banana Pi BPI-F3 and Orange Pi RV2) supports RVV 1.0 (RISC-V Vector extensions) which makes it interesting for on-device AI applications — exactly the kind of workload where Claude Code would be useful as an assistant.

Ubuntu 24.04 has full riscv64 support, Bun has experimental RISC-V support, and the ecosystem is maturing rapidly.

Request

Please add @anthropic-ai/claude-code-linux-riscv64 as an optional dependency and build the native binary for linux/riscv64 as part of the release workflow.

🤖 Issue filed from an Orange Pi RV2 running Ubuntu 24.04 riscv64

View original on GitHub ↗

5 Comments

github-actions[bot] · 3 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/35016
  2. https://github.com/anthropics/claude-code/issues/19406
  3. https://github.com/anthropics/claude-code/issues/10895

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

olofj · 3 months ago

FWIW, I've been able to use the last version before the binary-only version switch over by explicitly selecting it.

Not ideal, since you're stuck on an older version of the client, but it seems to work at the moment:

npm install -g @anthropic-ai/claude-code@2.1.112
platima · 2 months ago

Yeah I'm using this older version too (SpacemiT K3 RISC-V SOC with RVA23), but it's capped at Opus 4.7, no Opus 4.8, which is quite frustrating.

I would love a native RISC-V build, and I don't see why it would be so hard.

smoke-user · 1 month ago

+1 on this. I'm on an Orange Pi RV2 (RISC-V64, Ubuntu 24.04) running Claude Code as an always-on assistant over Telegram and tmux. Version 2.1.112 works great, but 2.1.113+ fails on install because there's no linux-riscv64 in the native binary matrix.

The real pain isn't just being stuck on an old version — it's being locked out of the newer models. I'm capped by Opus 4.7 (would love that 1M context) plus Sonnet 4.6 and Haiku 4.5, and for an always-on assistant, that's very sad.

Would love to see either a proper linux-riscv64 package or a Node.js fallback path when no native binary matches. Happy to test builds on real hardware.

platima · 1 month ago

FWIW I patched my 2.1.112 install in the end, as I wanted Opus 4.8. I've not patched in Fable or Sonnet 5, but I'll likely do that this weekend. Here's a one-liner:

cd /usr/local/lib/node_modules/@anthropic-ai/claude-code && sudo cp cli.js cli.js.bak && sudo sed -i 's/claude-opus-4-7/claude-opus-4-8/g; s/Opus 4\.7/Opus 4.8/g' cli.js && grep -c claude-opus-4-8 cli.js && echo PATCHED

There are some verifications in other parts of the code, hence re-purposing the Opus 4.7 lines rather than adding new ones. I confirmed with a few tests after the fact that it was definitely 4.8 running!

If this goes on for long enough I might write a patch script that also checks for ripgrep being installed and configured to use externally too. Will see how many upvotes this gets.

Showing cached comments. Read the full discussion on GitHub ↗