microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.43k stars 232 forks source link

Using node-pty gives the error: /lib64/libc.so.6: version `GLIBC_2.28' not found #540

Closed vijayth2-cerebras closed 1 year ago

vijayth2-cerebras commented 2 years ago

Environment details

LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core
ldd --version
ldd (GNU libc) 2.17
Copyright (C) 2012 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.

Issue description

In my dev environment, on running my app, I get the error from node-pty. /lib64/libc.so.6: version `GLIBC_2.28' not found

innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
   ...
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19) {
  code: 'MODULE_NOT_FOUND',
 }

Error: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ...build/node_modules/node-pty/build/Release/pty.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1127:18)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    ...
vijayth2-cerebras commented 2 years ago

When I do objdump -T pty.node, I get this entry:

0000000000000000      DF *UND*  0000000000000000  GLIBC_2.28  fcntl64 

I cloned the repo and did npm install. I checked the pty.node in the build/Release folder.

Tyriar commented 1 year ago

This looks like a dependency issue on your end?

nguyentranchung commented 10 months ago

This case happens when building on Ubuntu 22 and transferring the build file to Ubuntu 20 for use.