node-pty icon indicating copy to clipboard operation
node-pty copied to clipboard

Broken in Ubuntu 18.04

Open Elastino opened this issue 1 year ago • 5 comments
trafficstars

Environment details

  • OS: Linux Ubuntu
  • OS version: 18.04
  • node-pty version: 1.1.0-beta5

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)

Elastino avatar Dec 19 '23 03:12 Elastino

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.

Et7f3 avatar Dec 23 '23 02:12 Et7f3

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?

pettair avatar Dec 26 '23 21:12 pettair

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.

Et7f3 avatar Dec 26 '23 22:12 Et7f3

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: version GLIBC_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.

pettair avatar Dec 27 '23 19:12 pettair

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.

Et7f3 avatar Dec 28 '23 04:12 Et7f3