Install this version:
emerge -a =dev-util/claude-code-2.1.330
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-util/claude-code-2.1.330
Or alternatively:
emerge --autounmask-write -a =dev-util/claude-code-2.1.330
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Claude Code - an agentic coding tool by Anthropic"
HOMEPAGE="https://claude.com/product/claude-code"
# Tracks the upstream "latest" release channel, not "stable".
GCS_BUCKET="https://downloads.claude.ai/claude-code-releases"
SRC_URI="
amd64? (
elibc_glibc? ( ${GCS_BUCKET}/${PV}/linux-x64/claude -> claude-amd64-glibc-${PV} )
elibc_musl? ( ${GCS_BUCKET}/${PV}/linux-x64-musl/claude -> claude-amd64-musl-${PV} )
)
arm64? (
elibc_glibc? ( ${GCS_BUCKET}/${PV}/linux-arm64/claude -> claude-arm64-glibc-${PV} )
elibc_musl? ( ${GCS_BUCKET}/${PV}/linux-arm64-musl/claude -> claude-arm64-musl-${PV} )
)"
S="${WORKDIR}"
# Usable only with a paid subscription, under click-through terms; see HOMEPAGE.
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2"
REQUIRED_USE="amd64? ( cpu_flags_x86_avx cpu_flags_x86_avx2 )"
RESTRICT="bindist mirror strip"
RDEPEND="sys-apps/ripgrep"
QA_PREBUILT="opt/bin/claude"
src_install() {
exeinto /opt/bin
newexe "${DISTDIR}/${A[0]}" claude
insinto /etc/${PN}
newins "${FILESDIR}/managed-settings-native.json" managed-settings.json
}
pkg_postinst() {
if ! grep -q DISABLE_INSTALLATION_CHECKS "${EROOT}"/etc/claude-code/managed-settings.json; then
ewarn "Ensure you run etc-update or dispatch-conf before executing claude."
ewarn "Failure to properly integrate changes to /etc/claude-code/managed-settings.json"
ewarn "may lead to claude installing itself to your homedir without asking."
fi
}
Manage flags for this package:
euse -i <flag> -p dev-util/claude-code |
euse -E <flag> -p dev-util/claude-code |
euse -D <flag> -p dev-util/claude-code
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | claude-amd64-glibc-2.1.330 | 381121040 bytes | https://downloads.claude.ai/claude-code-releases/2.1.330/linux-x64/claude |
| DIST | claude-amd64-musl-2.1.330 | 367484168 bytes | https://downloads.claude.ai/claude-code-releases/2.1.330/linux-x64-musl/claude |
| DIST | claude-arm64-glibc-2.1.330 | 379971000 bytes | https://downloads.claude.ai/claude-code-releases/2.1.330/linux-arm64/claude |
| DIST | claude-arm64-musl-2.1.330 | 365065160 bytes | https://downloads.claude.ai/claude-code-releases/2.1.330/linux-arm64-musl/claude |