Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"g++-11: No such file or directory" when installing on Ubuntu #680

Open
maxmcd opened this issue Apr 25, 2024 · 0 comments
Open

"g++-11: No such file or directory" when installing on Ubuntu #680

maxmcd opened this issue Apr 25, 2024 · 0 comments

Comments

@maxmcd
Copy link

maxmcd commented Apr 25, 2024

Environment details

  • OS: Ubuntu
  • OS version: 24.04
  • node-pty version: 1.0.0 & 0.10.1

Issue description

The install seems insistent on looking for g++-11 but I have gcc 13 installed. Weirdly I am not running into this issue trying to install node-pty in a node:20.9 docker container, but not sure what differences there might be in each environment.

Any help would be greatly appreciated! I've re-installed the os from scratch and am still getting this issue :/

$ npm install node-pty
npm ERR! code 1
npm ERR! path /home/maxm/go/src/github.com/maxmcd/tmp/node_modules/node-pty
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/maxm/go/src/github.com/maxmcd/tmp/node_modules/node-pty/build'
npm ERR!   CXX(target) Release/obj.target/pty/src/unix/pty.o
npm ERR! make: Leaving directory '/home/maxm/go/src/github.com/maxmcd/tmp/node_modules/node-pty/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@20.9.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.12.3 found at "/home/maxm/.venv/bin/python3"
npm ERR! gyp info spawn /home/maxm/.venv/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/maxm/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/maxm/go/src/github.com/maxmcd/tmp/node_modules/node-pty/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/maxm/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/maxm/.cache/node-gyp/20.9.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/maxm/.cache/node-gyp/20.9.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/maxm/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/maxm/.cache/node-gyp/20.9.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/maxm/go/src/github.com/maxmcd/tmp/node_modules/node-pty',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! make: g++-11: No such file or directory
npm ERR! make: *** [pty.target.mk:115: Release/obj.target/pty/src/unix/pty.o] Error 127
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/maxm/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Linux 6.8.0-31-generic
npm ERR! gyp ERR! command "/home/maxm/.nvm/versions/node/v20.9.0/bin/node" "/home/maxm/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/maxm/go/src/github.com/maxmcd/tmp/node_modules/node-pty
npm ERR! gyp ERR! node -v v20.9.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant