Repository navigation
Description
Description
Hi team,
I'm encountering an issue when attempting to use the opencode command-line tool via bunx in a WSL (Windows Subsystem for Linux) environment.
Problem:
When I execute bunx opencode-ai in my WSL2 environment, Bun proceeds to download and run the tool. However, it appears to be selecting and installing opencode-linux-x64-baseline-musl in the temporary bunx cache. My WSL environment, however, uses glibc (as is typical for most WSL distributions). This results in runtime errors related to libc incompatibility when opencode-ai attempts to execute its underlying binary.
Specifically, the opencode binary (from node_modules/opencode-ai/bin/opencode within the bunx cache) fails to execute because it's compiled against musl while the system expects glibc.
Expected Behavior:
When bunx opencode-ai is executed, the opencode-ai package should correctly detect the glibc based WSL environment and ensure that the appropriate glibc compatible binary (i.e., opencode-linux-x64-baseline) is used/installed for execution.
Terminal Output:
$ bunx opencode-ai
ENOENT: no such file or directory, posix_spawn '/tmp/bunx-1000-opencode-ai@latest/node_modules/opencode-linux-x64-baseline-musl/bin/opencode'
$ ls /tmp/bunx-1000-opencode-ai@latest/node_modules
opencode-ai opencode-linux-x64 opencode-linux-x64-baseline opencode-linux-x64-baseline-musl opencode-linux-x64-musl
$ /tmp/bunx-1000-opencode-ai@latest/node_modules/opencode-linux-x64-baseline-musl/bin/opencode --version
zsh: no such file or directory: /tmp/bunx-1000-opencode-ai@latest/node_modules/opencode-linux-x64-baseline-musl/bin/opencode
$ /tmp/bunx-1000-opencode-ai@latest/node_modules/opencode-linux-x64-baseline/bin/opencode --version
1.1.23
My WSL Environment Details:
$ uname -a
Linux HOST 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
$ ldd --version
ldd (Ubuntu GLIBC 2.39-0ubuntu8.6) 2.39
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
Thank you for your time and consideration
Plugins
No response
OpenCode version
1.1.23
Steps to reproduce
- Set up a fresh WSL2 environment (e.g., Ubuntu 24.04 LTS).
- Install Bun (if not already installed).
- Run the command:
bunx opencode-ai - Observe the errors related to
libcincompatibility.
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal
Activity
github-actions commentedon Jan 16, 2026
This issue might be a duplicate of or related to existing issues. Please check:
Feel free to ignore if this doesn't address your specific case.
dodumosu commentedon Jan 18, 2026
Confirming that this also happens on native Linux. Since the automatic update to 1.1.25 on Ubuntu, it has been an issue:
sigmareaver commentedon Jan 19, 2026
This also happens on Manjaro when installing via AUR:
Dependencies:
My pamac looks like this:
youralmight commentedon Feb 27, 2026
This happens on macos bun, too.
github-actions commentedon Apr 28, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.