[BUG] v2.1.63 crashes on Alpine Linux (musl): posix_getdents symbol not found
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code v2.1.63 crashes immediately on Alpine Linux (musl libc) with:
Error relocating /home/claude/.local/bin/claude: posix_getdents: symbol not found
Every command fails, including claude --version.
What Should Happen?
Claude Code should start normally on Alpine Linux, as it did with v2.1.62.
Error Messages/Logs
Error relocating /home/claude/.local/bin/claude: posix_getdents: symbol not found
Steps to Reproduce
- Have Claude Code installed on Alpine Linux (musl-based)
- Auto-update to v2.1.63
- Run any command, e.g.
claude --version - Observe the
posix_getdents: symbol not founderror
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.62
Claude Code Version
2.1.63 (broken) / 2.1.62 (Claude Code) (rollback)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
Installing gcompat (glibc compatibility shim) does not resolve the issue.
posix_getdents is not provided by gcompat either.
The 2.1.63 binary is ~6MB larger than 2.1.62 (225MB vs 219MB), suggesting a
dependency change. posix_getdents is a glibc-specific symbol absent from musl libc.
Workaround: roll back the symlink:
ln -sf ~/.local/share/claude/versions/2.1.62 ~/.local/bin/claude
13 Comments
Yes this is a very big issue for every ExitBox user, we use Alpine to isolate and sandbox Claude and this update completely breaks Claude.
Small workaround for Alpine:
apk add gcompatposix_getdents_fix.c```
#define _GNU_SOURCE
#include <dirent.h>
#include <sys/syscall.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
ssize_t posix_getdents(int fd, void *buf, size_t count) {
return syscall(SYS_getdents64, fd, buf, count);
}
```
``
``gcc -shared -fPIC -O2 -o posix_getdents_fix.so posix_getdents_fix.c
```
$ LD_PRELOAD="/lib/libgcompat.so.0:/home/username/posix_getdents_fix.so" /home/username/.local/bin/claude
▐▛███▜▌ Claude Code v2.1.63
▝▜█████▛▘ Sonnet 4.6 · Claude Pro
▘▘ ▝▝
```
Thanks @CarstenGrohmann , fix worked for me
For anyone on Alpine who applied the posix_getdents shim workaround, you can make it permanent by wrapping the claude launcher so you don’t have to set LD_PRELOAD every time.
I kept the installer managed binary and just added a small wrapper in ~/.local/bin.
This keeps Claude auto updates working because the wrapper still calls the installer managed launcher. Now claude --version works normally without manually setting LD_PRELOAD.
Change last step to
LD_PRELOAD="/lib/libgcompat.so.0:$PWD/posix_getdents_fix.so" claude install 2.1.62
Also running into same issue reported
Same issue
same issue
same issue
We have a fix for this in the pipe + additional steps to prevent this going forward. This should be fixed early next week.
For the time being, please use a version prior to 2.1.63
+1
It seems solved already
This crash should no longer occur with 2.1.97 - we've added additional testing to prevent this going forward.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.