Mac OS에서 net-keepalive 모듈을 설치할 수 있지만 우분투 16.04에 설치할 수없는 이유를 모르겠습니다. 이 모듈을 사용하려는 이유는 node.JS net module close 이벤트가 예상대로 작동하지 않았기 때문에 TCP 서버가 Etghernet 케이블을 분리하면 이벤트를 닫는 데 걸리는 시간이 길어집니다. 내가 원하는 것은 노드 서버가 TCP 서버 이더넷 케이블을 뽑거나 전원을 끌 때마다 알 수 있습니다. net-keepalive 모듈을 우분투에 설치할 수 없다면, 다른 제안을 듣고 기꺼이 더 듣겠습니다.우분투에 net-keepalive 모듈을 설치할 수 없습니다. 16.04
다음과 같은 오류 메시지가 표시 : 우분투/데비안에
[email protected]:~$ sudo npm install net-keepalive
[sudo] password for chroma:
> [email protected] install /home/chroma/node_modules/net-keepalive/node_modules /ref
> node-gyp rebuild
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.
gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib
/configure.js:354:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-31-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/chroma/node_modules/net-keepalive/node_modules/ref
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
/home/chroma
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
└── [email protected]
npm WARN enoent ENOENT: no such file or directory, open '/home/chroma/package.json'
npm WARN chroma No description
npm WARN chroma No repository field.
npm WARN chroma No README data
npm WARN chroma No license field.
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "net-keepalive"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ref package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ref
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/chroma/npm-debug.log
'sudo apt-get install nodejs-legacy' 했습니까? 'node' 심볼릭 링크가 누락 된 것 같습니다. – mscdex
안녕하세요, mscdex, 정말 고마워요. 그것은 효과가 있었다. 그것은 내 첫 번째 우분투 시스템, 그것이 필요 symlink에 대한 필요성을 인식하지 못하겠습니까, 대답으로 답변을 repost 수 있습니까? 나는 그것에 대한 답으로 표시한다. Thx ~~~ –