Unable to install on windows with wsl

Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Activity 9 comments · opened Mar 1, 2025 · closed Mar 15, 2025
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

I have issue with instalation on windows 11 with wsl (alpine version):
claude
/usr/bin/env: unrecognized option: S
BusyBox v1.36.1 (2024-05-21 13:38:37 UTC) multi-call binary.

Usage: env [-i0] [-u NAME]... [-] [NAME=VALUE]... [PROG ARGS]

Print current environment or run PROG after setting up environment

-, -i Start with empty environment
-0 NUL terminated output
-u NAME Remove variable from environment

View original on GitHub ↗

9 Comments

ashwin-ant collaborator · 1 year ago
wolffiex collaborator · 1 year ago

@radek-paclt if you don't mind, can you let me know if your image has either zsh or bash or both? if so, what is the path? thanks!

andyg5000 · 1 year ago

I'm having the same issue on docker for mac using the official node apline images (https://hub.docker.com/_/node)

Here are the paths you asked for:

cat /etc/shells
# valid login shells
/bin/sh
/bin/ash
/bin/bash
andyg5000 · 1 year ago
The error you're seeing is related to how you're trying to run the script using the shebang line 
(#!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps). 
On Alpine Linux, which uses BusyBox, the -S option is not supported in the env command.

I'm able to run it with node --no-warnings=ExperimentalWarning --enable-source-maps /usr/local/bin/claude

wolffiex collaborator · 1 year ago

we've made a bunch of shell improvements. hoping this issue was fixed. please reopen with details if not

andyg5000 · 1 year ago

Using v0.2.48 and still getting the same error in busybox/alpine for the same reason of my last post. Should we expect to be able to run this in those environments?

$ claude
/usr/bin/env: unrecognized option: S
BusyBox v1.36.1 (2024-06-10 07:11:47 UTC) multi-call binary.

Usage: env [-i0] [-u NAME]... [-] [NAME=VALUE]... [PROG ARGS]

Print current environment or run PROG after setting up environment

	-, -i	Start with empty environment
	-0	NUL terminated output
	-u NAME	Remove variable from environment
radekpacltntt · 1 year ago

@andyg5000 don't waste time and run in docker container. it solves all my not only install, but also security concerns and problems

andyg5000 · 1 year ago

Turns out I was missing coreutils

If running an alpine image, apk add coreutils should fix this for you. 🎉

github-actions[bot] · 1 year ago

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.