microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.42k stars 233 forks source link

Broken in Ubuntu 18.04 #648

Open Elastino opened 6 months ago

Elastino commented 6 months ago

Environment details

Issue description

Delivered with vscode, Insiders-279872bd965e4030c81129a9bf1ce1710ff7cd55. Fails to load due to incompatible GLIBC version 2.28 where Ubuntu 18.04 is shipped with 2.27.

[IPC Library: Pty Host] Error: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.28 not found (required by /home/worker/.vscode-server-insiders/cli/servers/Insiders-279872bd965e4030c81129a9bf1ce1710ff7cd55/server/node_modules/node-pty/build/Release/pty.node)

Et7f3 commented 6 months ago

ubuntu 18.04 is out of LTS since april. You should consider upgrading your system. If you can try to use old version of node-pty or rebuild the prebuilt binary yourself and copy at this location.

pettair commented 6 months ago

Hi I have the same problem as @Elastino. Also Im bound to 18.04 so downgrading the node-pty would be my only option. Im not really familiar with node js @Et7f3 can you detail how could I downgrade the node-pty package?

Et7f3 commented 6 months ago

You didn't specified your installation method. So I will assume you did npm install node-pty this command create if not present package.json and add a line similar to "node-pty": "*" in dependencies section. Just replace it with another version: you can search version on the npm registry good luck to find one out of these 143 versions.

Bisecting version might be the best strategy.

pettair commented 6 months ago

Ahh right! Sorry I missed that.

So Im using the "Remote Development" extension pack in VS Code insiders which is installing the "Remote - SSH" extension with version "v0.107.1" I install everything via the VS Code built in extension manager.

The exact error message that I see in the output of the "Remote - SSH" the is: [20:25:04.919] [server] [IPC Library: Pty Host] Error: /lib/aarch64-linux-gnu/libc.so.6: versionGLIBC_2.28' not found (required by ~/.vscode-server-insiders/cli/servers/Insiders-9621add46007f7a1ab37d1fce9bcdcecca62aeb0/server/node_modules/node-pty/build/Release/pty.node)`

There I can see a pacage.json file, but the content of it is not resembling to what I would expect it only contains this: cat ~/.vscode-server-insiders/cli/servers/Insiders-9621add46007f7a1ab37d1fce9bcdcecca62aeb0/server/package.json { "name": "Code - Insiders", "version": "1.86.0-insider", "private": true }

and if I check the 'node_modules/node-pty/build/Release/pty.node' file that seems like a pre-build binary, not javascript files.

Et7f3 commented 6 months ago

Does this folder exist ~/.vscode-server-insiders/cli/servers/Insiders-9621add46007f7a1ab37d1fce9bcdcecca62aeb0/server/node_modules/node-pty or it get deleted after installation error ? If it persists I would probably try in a empty project wich version of node-pty works and copy the binary there (replacing pty.node).

f it doesn't works then I will probably launch in a container (so I can have a ubuntu 22.04 filesystem for vs code), it only needs file system isolation so I will launch with --network=host and -v /dev:/dev ... same for other mount point. I really hope the first solution works. This solution is a kind of hammer a bit hard but always works.