0

执行 $ npm install -g pm2-web 后报错

npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hoek@0.7.6: The major version is no longer supported. Please update to 4.x or newer
npm WARN checkPermissions Missing write access to /opt/node/lib/node_modules/pm2-web/node_modules/mdns2
npm ERR! path /opt/node/lib/node_modules/pm2-web/node_modules/mdns2
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/opt/node/lib/node_modules/pm2-web/node_modules/mdns2'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-11T15_19_26_614Z-debug.log

执行 $ cnpm install -g pm2-web 则出现以下报错

In file included from ../src/dns_sd.cpp:1:0:
../src/mdns.hpp:31:20: 致命错误:dns_sd.h:没有那个文件或目录
 #include <dns_sd.h>
                    ^
编译中断。
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] 错误 1
make: 离开目录“/opt/node/lib/node_modules/pm2-web/node_modules/_mdns2@2.1.4@mdns2/build”
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/node/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.4.95-1.al7.x86_64
gyp ERR! command "/opt/node/bin/node" "/opt/node/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/node/lib/node_modules/pm2-web/node_modules/_mdns2@2.1.4@mdns2
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
[npminstall:runscript:error] mdns2@^2.1.0 has binding.gyp file, run "node-gyp rebuild" error: Error: Run "sh -c node-gyp rebuild" error, exit code 1
[mdns2@^2.1.0] optional install error: Error: Run "sh -c node-gyp rebuild" error, exit code 1
    at ChildProcess.proc.on.code (/opt/node/lib/node_modules/cnpm/node_modules/runscript/index.js:74:21)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
execute post install 1 scripts...

系统是 Linux work 4.4.95-1.al7.x86_64 #1 SMP Fri Dec 8 15:37:38 CST 2017 x86_64 x86_64 x86_64 GNU/Linux

求助一下是哪里出了问题

Mure 133
2019-01-11 提问
0 个回答

撰写答案

你可能感兴趣的

推广链接