-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
bugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:linuxIssue specifically occurs on LinuxIssue specifically occurs on Linux
Description
Description
Plugin installation fails with EXDEV: cross-device link not permitted when /tmp is mounted as tmpfs (common default on modern Linux distros like Ubuntu, Fedora, Arch).
Steps to Reproduce
- Have
/tmpmounted as tmpfs (default on Ubuntu 25.10, many other distros) - Have
~/.claudeon a different filesystem (ext4, btrfs, etc.) - Attempt to install any plugin via
/pluginsUI
Error Message
Error: Failed to install: EXDEV: cross-device link not permitted,
rename '/home/user/.claude/plugins/cache/hiivmind-corpus-github' -> '/tmp/claude-plugin-temp-1766187024245'
Environment
- OS: Ubuntu 25.10 (Questing Quetzal)
- Kernel: 6.17.0-8-generic
- /tmp: tmpfs mount (
tmpfs on /tmp type tmpfs) - ~/.claude: ext4 on nvme (
/dev/nvme0n1p2) - Claude Code Version: Latest (1.0.40)
Root Cause
Node.js fs.rename() cannot move files across filesystem boundaries. The plugin installer uses rename() to move between ~/.claude/plugins/cache/ and /tmp/, which fails with EXDEV when these are on different mount points.
This is increasingly common as:
- Ubuntu 21.04+ defaults to tmpfs for /tmp
- Fedora, Arch, and others also use tmpfs /tmp by default
- Many users have /home on a separate partition
Workaround
Set TMPDIR to a location on the same filesystem as ~/.claude:
mkdir -p ~/.claude/tmp
TMPDIR=~/.claude/tmp claudeOr permanently in shell profile:
echo 'export TMPDIR="$HOME/.claude/tmp"' >> ~/.bashrcSuggested Fix
Catch EXDEV error and fall back to copy+unlink pattern:
try {
fs.renameSync(src, dest);
} catch (err) {
if (err.code === 'EXDEV') {
fs.cpSync(src, dest, { recursive: true });
fs.rmSync(src, { recursive: true, force: true });
} else {
throw err;
}
}This is the standard pattern for handling cross-device moves in Node.js.
Related
- [BUG] Plugin install fails with EINVAL: invalid argument, rename - directory moved into itself #13503 - Similar rename issue (EINVAL, different root cause)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:linuxIssue specifically occurs on LinuxIssue specifically occurs on Linux