opencode
opencode copied to clipboard
Cannot open terminal from opencode web
Description
:~$ 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/[email protected]/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 --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.11) 2.35
Copyright (C) 2022 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.
OpenCode version
1.0.164
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
WSL
Terminal
No response
This issue might be a duplicate of existing issues. Please check:
- #3045: GLIBC_2.25 Required -> Need An Alternative
- #4908: GLIBC_2.18' not found (required by opencode)
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.