You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:~$ opencode web
█▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█
█░░█ █░░█ █▀▀▀ █░░█ █░░░ █░░█ █░░█ █▀▀▀
▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀
Web interface: http://127.0.0.1:34305/
Failed to load lib 71 | Set BUN_PTY_LIB or ensure one of these paths contains the file.`);72 | }73 | var libPath = resolveLibPath();74 | var lib;75 | try {76 | lib = dlopen(libPath, { ^error: Failed to open library "/tmp/.1ebbff7e77fcfd7a-00000001.so": /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /tmp/.1ebbff7e77fcfd7a-00000001.so) syscall: "dlopen", errno: 0, code: "ERR_DLOPEN_FAILED" at dlopen (bun:ffi:345:28) at <anonymous> (../../node_modules/.bun/bun-pty@0.4.2/node_modules/bun-pty/dist/index.js:76:9) at <anonymous> (/$bunfs/root/src/index.js:28:48) at <anonymous> (src/pty/index.ts:36:23)^C:~$ ldd --versionldd (Ubuntu GLIBC 2.35-0ubuntu3.11) 2.35Copyright (C) 2022 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Written by Roland McGrath and Ulrich Drepper.
OpenCode version
1.0.164
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
WSL
Terminal
No response
Reacted by Craig Hesling, pinage404 and Louis Dauvergne
These issues also report similar GLIBC version compatibility errors on older Linux systems. The root cause appears to be that OpenCode (or its dependencies like bun-pty) is compiled against a newer version of GLIBC than what's available on your system.
Feel free to ignore if your specific case involves the PTY library loading within the web interface, which may be a distinct issue.
Still facing this issue on the latest docker image when trying to toggle the terminal in opencode web:
INFO 2026-01-08T17:42:36 +137ms service=default version=1.1.6 args=["--port=3000","--hostname=0.0.0.0","--print-logs","--log-level=DEBUG"] opencode
INFO 2026-01-08T17:42:36 +1ms service=config path=/root/.config/opencode/config.json loading
INFO 2026-01-08T17:42:36 +1ms service=config path=/root/.config/opencode/opencode.json loading
INFO 2026-01-08T17:42:36 +12ms service=config path=/root/.config/opencode/opencode.jsonc loading
ERROR 2026-01-08T17:43:06 +29808ms service=default e=undefined is not an object (evaluating 'array3.length') rejection
ERROR 2026-01-08T17:43:06 +1ms service=default TypeError: undefined is not an object (evaluating 'array3.length')
Failed to load lib 99 | // biome-ignore lint/suspicious/noExplicitAny: <explanation>
100 | let lib: any;
101 |
102 | // try to load the lib, if it fails log the error
103 | try {
104 | lib = dlopen(libPath, {
^
error: Failed to open library "/tmp/.fd98d2bfe5febbfc-00000001.so": Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /tmp/.fd98d2bfe5febbfc-00000001.so)
syscall: "dlopen",
errno: 0,
code: "ERR_DLOPEN_FAILED"
at dlopen (bun:ffi:345:28)
at <anonymous> (../../node_modules/.bun/bun-pty@0.4.4/node_modules/bun-pty/src/terminal.ts:104:8)
at <anonymous> (/$bunfs/root/src/cli/cmd/tui/worker.js:28:48)
at <anonymous> (../../node_modules/.bun/bun-pty@0.4.4/node_modules/bun-pty/src/index.ts:6:1)
at <anonymous> (/$bunfs/root/src/cli/cmd/tui/worker.js:28:48)
at <anonymous> (src/pty/index.ts:19:23)
probably related to opencode official docker image being an alpine image:
__tls_get_addr: symbol not found
getauxval: symbol not found
gnu_get_libc_version: symbol not found
We temporarily resolved the problem using the following steps:
Install the glibc compatibility layer: Use sgerrand/alpine-pkg-glibc to import the glibc library files into Alpine.
Force download of the glibc binary: Manually download opencode-linux-x64.tar.gz (the glibc compiled version) from GitHub Releases instead of using the official installation script (which will automatically detect and install the musl version).
FROM ghcr.io/anomalyco/opencode:1.2.15
USER root
ENV GLIBC_RELEASE_VERSION=2.35-r1
ENV BUN_VERSION=1.3.9
RUN apk del libc6-compat gcompat || true \
&& apk add --no-cache curl libstdc++ unzip bash \
&& curl -L https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \
&& curl -L https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_RELEASE_VERSION}/glibc-${GLIBC_RELEASE_VERSION}.apk -o glibc.apk \
&& apk add --no-cache --force-overwrite glibc.apk \
&& rm glibc.apk
RUN curl -fsSL https://github.com/anomalyco/opencode/releases/download/v1.2.15/opencode-linux-x64.tar.gz -o opencode.tar.gz \
&& tar -xzf opencode.tar.gz -C /usr/local/bin \
&& rm opencode.tar.gz \
&& chmod +x /usr/local/bin/opencode \
# Ensure glibc loader is in the standard path
&& mkdir -p /lib64 \
&& ln -sf /usr/glibc-compat/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
ENV LD_LIBRARY_PATH=/usr/glibc-compat/lib
Still seeing this on 1.2.26, this is what I see in browser console (Firefox):
Failed to create terminal
Object { name: "UnknownError", data: {…} }
data: Object { message: "TypeError: undefined is not an object (evaluating 'lib.symbols')\n at new Terminal2 (/$bunfs/root/src/index.js:253583:22)\n at spawn6 (/$bunfs/root/src/index.js:253698:23)\n at create (/$bunfs/root/src/index.js:253805:32)\n at processTicksAndRejections (native:7:39)" }
name: "UnknownError"
<prototype>: Object { … }
index-DybCx3KW.js:2423:174225
new http://localhost:4096/assets/index-DybCx3KW.js:2423
(Async: promise callback)
new http://localhost:4096/assets/index-DybCx3KW.js:2423
new http://localhost:4096/assets/index-DybCx3KW.js:2423
s http://localhost:4096/assets/index-DybCx3KW.js:2
lz http://localhost:4096/assets/index-DybCx3KW.js:2
Activity
github-actions commentedon Dec 17, 2025
This issue might be a duplicate of existing issues. Please check:
These issues also report similar GLIBC version compatibility errors on older Linux systems. The root cause appears to be that OpenCode (or its dependencies like bun-pty) is compiled against a newer version of GLIBC than what's available on your system.
Feel free to ignore if your specific case involves the PTY library loading within the web interface, which may be a distinct issue.
remorses commentedon Dec 30, 2025
This is a GLIBC version mismatch in bun-pty. The library was built on Ubuntu 24.04 (GLIBC 2.39) but the system has an older version.
Fix PR: sursaone/bun-pty#23
This switches the build to ubuntu-20.04 (GLIBC 2.31) for broader compatibility.
Material-Scientist commentedon Jan 8, 2026
Still facing this issue on the latest docker image when trying to toggle the terminal in opencode web:
Nomad job:
remixer-dec commentedon Feb 16, 2026
issue still exists, for desktop app as well
probably related to opencode official docker image being an alpine image:
__tls_get_addr: symbol not found
getauxval: symbol not found
gnu_get_libc_version: symbol not found
jinghuan-Chen commentedon Mar 3, 2026
We temporarily resolved the problem using the following steps:
Hopefully this method can help others!
mendhak commentedon Mar 13, 2026
Still seeing this on 1.2.26, this is what I see in browser console (Firefox):
github-actions commentedon Jul 3, 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.