Try npm install mediasoup under centos linux as root, but failed

[root@server04 mediasoup-sample-app]# /root/webrtc/node-v14.17.4-linux-x64/bin/npm i mediasoup

> mediasoup@3.8.0 postinstall /root/webrtc/mediasoup-sample-app/node_modules/mediasoup
> node npm-scripts.js postinstall

npm-scripts.js [INFO] running task "postinstall"
npm-scripts.js [INFO] executing command: make -C worker
make: 进入目录“/root/webrtc/mediasoup-sample-app/node_modules/mediasoup/worker”
/usr/bin/python2 ./scripts/configure.py -R mediasoup-worker
['-R', 'mediasoup-worker', '/root/webrtc/mediasoup-sample-app/node_modules/mediasoup/worker/mediasoup-worker.gyp', '-I', '/root/webrtc/mediasoup-sample-app/node_modules/mediasoup/worker/common.gypi', '--depth=.', '-f', 'make', '-Goutput_dir=/root/webrtc/mediasoup-sample-app/node_modules/mediasoup/worker/out', '--generator-output', '/root/webrtc/mediasoup-sample-app/node_modules/mediasoup/worker/out', '-Dgcc_version=93', '-Dclang=0', '-Dhost_arch=x64', '-Dtarget_arch=x64', '-Dopenssl_fips=', '-Dmediasoup_asan=false', '-Dnode_byteorder=little']
Traceback (most recent call last):
  File "./scripts/configure.py", line 114, in <module>
    run_gyp(gyp_args)
  File "./scripts/configure.py", line 52, in run_gyp
    rc = gyp.main(args)
  File "./deps/gyp/pylib/gyp/__init__.py", line 545, in main
    return gyp_main(args)
  File "./deps/gyp/pylib/gyp/__init__.py", line 530, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "./deps/gyp/pylib/gyp/generator/make.py", line 2147, in GenerateOutput
    root_makefile = open(makefile_path, 'w')
IOError: [Errno 2] No such file or directory: '/root/webrtc/mediasoup-sample-app/node_modules/mediasoup/worker/out/Makefile'
make: *** [Makefile:24:default] 错误 1
make: 离开目录“/root/webrtc/mediasoup-sample-app/node_modules/mediasoup/worker”
npm WARN mediasoup-sample-app@1.2.2 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mediasoup@3.8.0 postinstall: `node npm-scripts.js postinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mediasoup@3.8.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-07-30T08_32_01_227Z-debug.log


# cat /root/.npm/_logs/2021-07-30T08_32_01_227Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/root/webrtc/node-v14.17.4-linux-x64/bin/node',
1 verbose cli   '/root/webrtc/node-v14.17.4-linux-x64/bin/npm',
1 verbose cli   'i',
1 verbose cli   'mediasoup'
1 verbose cli ]
2 info using npm@6.14.14
3 info using node@v14.17.4
4 verbose npm-session 083249b5984e4e60
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/mediasoup 1153ms (from cache)
8 silly pacote range manifest for mediasoup@3 fetched in 1174ms
9 timing stage:loadCurrentTree Completed in 1563ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 3ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 75ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule mediasoup@3.8.0 checking installable status
17 http fetch GET 304 https://registry.npmjs.org/@types%2fnode 357ms (from cache)
18 silly pacote range manifest for @types/node@^14.14.43 fetched in 383ms
19 silly resolveWithNewModule @types/node@14.17.6 checking installable status
20 http fetch GET 304 https://registry.npmjs.org/netstring 741ms (from cache)
21 silly pacote range manifest for netstring@^0.3.0 fetched in 745ms
22 silly resolveWithNewModule netstring@0.3.0 checking installable status
23 http fetch GET 304 https://registry.npmjs.org/supports-color 757ms (from cache)
24 silly pacote range manifest for supports-color@^9.0.2 fetched in 760ms
25 silly resolveWithNewModule supports-color@9.0.2 checking installable status
26 http fetch GET 304 https://registry.npmjs.org/debug 791ms (from cache)
27 silly pacote range manifest for debug@^4.3.2 fetched in 794ms
28 silly resolveWithNewModule debug@4.3.2 checking installable status
29 http fetch GET 304 https://registry.npmjs.org/random-number 814ms (from cache)
30 silly pacote range manifest for random-number@^0.0.9 fetched in 817ms
31 silly resolveWithNewModule random-number@0.0.9 checking installable status
32 http fetch GET 304 https://registry.npmjs.org/ms 223ms (from cache)
33 silly pacote version manifest for ms@2.1.2 fetched in 226ms
34 silly resolveWithNewModule ms@2.1.2 checking installable status
35 http fetch GET 304 https://registry.npmjs.org/has-flag 195ms (from cache)
36 silly pacote range manifest for has-flag@^5.0.0 fetched in 197ms
37 silly resolveWithNewModule has-flag@5.0.1 checking installable status
38 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1446ms
39 timing stage:loadIdealTree Completed in 1576ms
40 silly currentTree mediasoup-sample-app@1.2.2
40 silly currentTree ├── @types/debug@4.1.7
40 silly currentTree ├── @types/events@3.0.0
40 silly currentTree ├── @types/ms@0.7.31
40 silly currentTree ├── accepts@1.3.7
40 silly currentTree ├── after@0.8.2
40 silly currentTree ├── array-flatten@1.1.1
40 silly currentTree ├── arraybuffer.slice@0.0.7
40 silly currentTree ├── awaitqueue@2.3.3
40 silly currentTree ├── backo2@1.0.2
40 silly currentTree ├── base64-arraybuffer@0.1.4
40 silly currentTree ├── base64id@2.0.0
40 silly currentTree ├── blob@0.0.5
40 silly currentTree ├── body-parser@1.19.0
40 silly currentTree ├── bowser@2.11.0
40 silly currentTree ├── bytes@3.1.0
40 silly currentTree ├── component-bind@1.0.0
40 silly currentTree ├── component-emitter@1.3.0
40 silly currentTree ├── component-inherit@0.0.3
40 silly currentTree ├── content-disposition@0.5.3
40 silly currentTree ├── content-type@1.0.4
40 silly currentTree ├── cookie-signature@1.0.6
40 silly currentTree ├── cookie@0.4.0
40 silly currentTree ├── debug@2.6.9
40 silly currentTree ├── depd@1.1.2
40 silly currentTree ├── destroy@1.0.4
40 silly currentTree ├── ee-first@1.1.1
40 silly currentTree ├── encodeurl@1.0.2
40 silly currentTree ├─┬ engine.io-client@3.5.2
40 silly currentTree │ └── debug@3.1.0
40 silly currentTree ├── engine.io-parser@2.2.1
40 silly currentTree ├─┬ engine.io@3.5.0
40 silly currentTree │ ├── cookie@0.4.1
40 silly currentTree │ ├── debug@4.1.1
40 silly currentTree │ └── ms@2.1.3
40 silly currentTree ├── escape-html@1.0.3
40 silly currentTree ├── etag@1.8.1
40 silly currentTree ├── event-target-shim@5.0.1
40 silly currentTree ├── events@3.3.0
40 silly currentTree ├── express@4.17.1
40 silly currentTree ├── fake-mediastreamtrack@1.1.6
40 silly currentTree ├── finalhandler@1.1.2
40 silly currentTree ├── forwarded@0.2.0
40 silly currentTree ├── fresh@0.5.2
40 silly currentTree ├─┬ h264-profile-level-id@1.0.1
40 silly currentTree │ ├── debug@4.3.2
40 silly currentTree │ └── ms@2.1.2
40 silly currentTree ├── has-binary2@1.0.3
40 silly currentTree ├── has-cors@1.1.0
40 silly currentTree ├── http-errors@1.7.2
40 silly currentTree ├── iconv-lite@0.4.24
40 silly currentTree ├── indexof@0.0.1
40 silly currentTree ├── inherits@2.0.3
40 silly currentTree ├── ipaddr.js@1.9.1
40 silly currentTree ├── isarray@2.0.1
40 silly currentTree ├── media-typer@0.3.0
40 silly currentTree ├─┬ mediasoup-client@3.6.36
40 silly currentTree │ ├── debug@4.3.2
40 silly currentTree │ ├── has-flag@4.0.0
40 silly currentTree │ ├── ms@2.1.2
40 silly currentTree │ └── supports-color@8.1.1
40 silly currentTree ├── merge-descriptors@1.0.1
40 silly currentTree ├── methods@1.1.2
40 silly currentTree ├── mime-db@1.49.0
40 silly currentTree ├── mime-types@2.1.32
40 silly currentTree ├── mime@1.6.0
40 silly currentTree ├── ms@2.0.0
40 silly currentTree ├── negotiator@0.6.2
40 silly currentTree ├── on-finished@2.3.0
40 silly currentTree ├── parseqs@0.0.6
40 silly currentTree ├── parseuri@0.0.6
40 silly currentTree ├── parseurl@1.3.3
40 silly currentTree ├── path-to-regexp@0.1.7
40 silly currentTree ├── proxy-addr@2.0.7
40 silly currentTree ├── qs@6.7.0
40 silly currentTree ├── range-parser@1.2.1
40 silly currentTree ├── raw-body@2.4.0
40 silly currentTree ├── requirejs@2.3.6
40 silly currentTree ├── safe-buffer@5.1.2
40 silly currentTree ├── safer-buffer@2.1.2
40 silly currentTree ├── sdp-transform@2.14.1
40 silly currentTree ├─┬ send@0.17.1
40 silly currentTree │ └── ms@2.1.1
40 silly currentTree ├── serve-static@1.14.1
40 silly currentTree ├── setprototypeof@1.1.1
40 silly currentTree ├── socket.io-adapter@1.1.2
40 silly currentTree ├─┬ socket.io-client@2.4.0
40 silly currentTree │ ├── debug@3.1.0
40 silly currentTree │ └── socket.io-parser@3.3.2
40 silly currentTree ├─┬ socket.io-parser@3.4.1
40 silly currentTree │ ├── component-emitter@1.2.1
40 silly currentTree │ ├── debug@4.1.1
40 silly currentTree │ └── ms@2.1.3
40 silly currentTree ├─┬ socket.io@2.4.1
40 silly currentTree │ ├── debug@4.1.1
40 silly currentTree │ └── ms@2.1.3
40 silly currentTree ├── statuses@1.5.0
40 silly currentTree ├── to-array@0.1.4
40 silly currentTree ├── toidentifier@1.0.0
40 silly currentTree ├── type-is@1.6.18
40 silly currentTree ├── typescript@4.3.5
40 silly currentTree ├── unpipe@1.0.0
40 silly currentTree ├── utils-merge@1.0.1
40 silly currentTree ├── uuid@8.3.2
40 silly currentTree ├── vary@1.1.2
40 silly currentTree ├── ws@7.4.6
40 silly currentTree ├── xmlhttprequest-ssl@1.6.3
40 silly currentTree └── yeast@0.1.2
41 silly idealTree mediasoup-sample-app@1.2.2
41 silly idealTree ├── @types/debug@4.1.7
41 silly idealTree ├── @types/events@3.0.0
41 silly idealTree ├── @types/ms@0.7.31
41 silly idealTree ├── @types/node@14.17.6
41 silly idealTree ├── accepts@1.3.7
41 silly idealTree ├── after@0.8.2
41 silly idealTree ├── array-flatten@1.1.1
41 silly idealTree ├── arraybuffer.slice@0.0.7
41 silly idealTree ├── awaitqueue@2.3.3
41 silly idealTree ├── backo2@1.0.2
41 silly idealTree ├── base64-arraybuffer@0.1.4
41 silly idealTree ├── base64id@2.0.0
41 silly idealTree ├── blob@0.0.5
41 silly idealTree ├── body-parser@1.19.0
41 silly idealTree ├── bowser@2.11.0
41 silly idealTree ├── bytes@3.1.0
41 silly idealTree ├── component-bind@1.0.0
41 silly idealTree ├── component-emitter@1.3.0
41 silly idealTree ├── component-inherit@0.0.3
41 silly idealTree ├── content-disposition@0.5.3
41 silly idealTree ├── content-type@1.0.4
41 silly idealTree ├── cookie-signature@1.0.6
41 silly idealTree ├── cookie@0.4.0
41 silly idealTree ├── debug@2.6.9
41 silly idealTree ├── depd@1.1.2
41 silly idealTree ├── destroy@1.0.4
41 silly idealTree ├── ee-first@1.1.1
41 silly idealTree ├── encodeurl@1.0.2
41 silly idealTree ├─┬ engine.io-client@3.5.2
41 silly idealTree │ └── debug@3.1.0
41 silly idealTree ├── engine.io-parser@2.2.1
41 silly idealTree ├─┬ engine.io@3.5.0
41 silly idealTree │ ├── cookie@0.4.1
41 silly idealTree │ ├── debug@4.1.1
41 silly idealTree │ └── ms@2.1.3
41 silly idealTree ├── escape-html@1.0.3
41 silly idealTree ├── etag@1.8.1
41 silly idealTree ├── event-target-shim@5.0.1
41 silly idealTree ├── events@3.3.0
41 silly idealTree ├── express@4.17.1
41 silly idealTree ├── fake-mediastreamtrack@1.1.6
41 silly idealTree ├── finalhandler@1.1.2
41 silly idealTree ├── forwarded@0.2.0
41 silly idealTree ├── fresh@0.5.2
41 silly idealTree ├─┬ h264-profile-level-id@1.0.1
41 silly idealTree │ ├── debug@4.3.2
41 silly idealTree │ └── ms@2.1.2
41 silly idealTree ├── has-binary2@1.0.3
41 silly idealTree ├── has-cors@1.1.0
41 silly idealTree ├── has-flag@5.0.1
41 silly idealTree ├── http-errors@1.7.2
41 silly idealTree ├── iconv-lite@0.4.24
41 silly idealTree ├── indexof@0.0.1
41 silly idealTree ├── inherits@2.0.3
41 silly idealTree ├── ipaddr.js@1.9.1
41 silly idealTree ├── isarray@2.0.1
41 silly idealTree ├── media-typer@0.3.0
41 silly idealTree ├─┬ mediasoup-client@3.6.36
41 silly idealTree │ ├── debug@4.3.2
41 silly idealTree │ ├── has-flag@4.0.0
41 silly idealTree │ ├── ms@2.1.2
41 silly idealTree │ └── supports-color@8.1.1
41 silly idealTree ├─┬ mediasoup@3.8.0
41 silly idealTree │ ├── debug@4.3.2
41 silly idealTree │ └── ms@2.1.2
41 silly idealTree ├── merge-descriptors@1.0.1
41 silly idealTree ├── methods@1.1.2
41 silly idealTree ├── mime-db@1.49.0
41 silly idealTree ├── mime-types@2.1.32
41 silly idealTree ├── mime@1.6.0
41 silly idealTree ├── ms@2.0.0
41 silly idealTree ├── negotiator@0.6.2
41 silly idealTree ├── netstring@0.3.0
41 silly idealTree ├── on-finished@2.3.0
41 silly idealTree ├── parseqs@0.0.6
41 silly idealTree ├── parseuri@0.0.6
41 silly idealTree ├── parseurl@1.3.3
41 silly idealTree ├── path-to-regexp@0.1.7
41 silly idealTree ├── proxy-addr@2.0.7
41 silly idealTree ├── qs@6.7.0
41 silly idealTree ├── random-number@0.0.9
41 silly idealTree ├── range-parser@1.2.1
41 silly idealTree ├── raw-body@2.4.0
41 silly idealTree ├── requirejs@2.3.6
41 silly idealTree ├── safe-buffer@5.1.2
41 silly idealTree ├── safer-buffer@2.1.2
41 silly idealTree ├── sdp-transform@2.14.1
41 silly idealTree ├─┬ send@0.17.1
41 silly idealTree │ └── ms@2.1.1
41 silly idealTree ├── serve-static@1.14.1
41 silly idealTree ├── setprototypeof@1.1.1
41 silly idealTree ├── socket.io-adapter@1.1.2
41 silly idealTree ├─┬ socket.io-client@2.4.0
41 silly idealTree │ ├── debug@3.1.0
41 silly idealTree │ └── socket.io-parser@3.3.2
41 silly idealTree ├─┬ socket.io-parser@3.4.1
41 silly idealTree │ ├── component-emitter@1.2.1
41 silly idealTree │ ├── debug@4.1.1
41 silly idealTree │ └── ms@2.1.3
41 silly idealTree ├─┬ socket.io@2.4.1
41 silly idealTree │ ├── debug@4.1.1
41 silly idealTree │ └── ms@2.1.3
41 silly idealTree ├── statuses@1.5.0
41 silly idealTree ├── supports-color@9.0.2
41 silly idealTree ├── to-array@0.1.4
41 silly idealTree ├── toidentifier@1.0.0
41 silly idealTree ├── type-is@1.6.18
41 silly idealTree ├── typescript@4.3.5
41 silly idealTree ├── unpipe@1.0.0
41 silly idealTree ├── utils-merge@1.0.1
41 silly idealTree ├── uuid@8.3.2
41 silly idealTree ├── vary@1.1.2
41 silly idealTree ├── ws@7.4.6
41 silly idealTree ├── xmlhttprequest-ssl@1.6.3
41 silly idealTree └── yeast@0.1.2
42 silly install generateActionsToTake
43 timing stage:generateActionsToTake Completed in 14ms
44 silly diffTrees action count 8
45 silly diffTrees add has-flag@5.0.1
46 silly diffTrees add ms@2.1.2
47 silly diffTrees add @types/node@14.17.6
48 silly diffTrees add debug@4.3.2
49 silly diffTrees add netstring@0.3.0
50 silly diffTrees add random-number@0.0.9
51 silly diffTrees add supports-color@9.0.2
52 silly diffTrees add mediasoup@3.8.0
53 silly decomposeActions action count 64
54 silly decomposeActions fetch has-flag@5.0.1
55 silly decomposeActions extract has-flag@5.0.1
56 silly decomposeActions preinstall has-flag@5.0.1
57 silly decomposeActions build has-flag@5.0.1
58 silly decomposeActions install has-flag@5.0.1
59 silly decomposeActions postinstall has-flag@5.0.1
60 silly decomposeActions finalize has-flag@5.0.1
61 silly decomposeActions refresh-package-json has-flag@5.0.1
62 silly decomposeActions fetch ms@2.1.2
63 silly decomposeActions extract ms@2.1.2
64 silly decomposeActions preinstall ms@2.1.2
65 silly decomposeActions build ms@2.1.2
66 silly decomposeActions install ms@2.1.2
67 silly decomposeActions postinstall ms@2.1.2
68 silly decomposeActions finalize ms@2.1.2
69 silly decomposeActions refresh-package-json ms@2.1.2
70 silly decomposeActions fetch @types/node@14.17.6
71 silly decomposeActions extract @types/node@14.17.6
72 silly decomposeActions preinstall @types/node@14.17.6
73 silly decomposeActions build @types/node@14.17.6
74 silly decomposeActions install @types/node@14.17.6
75 silly decomposeActions postinstall @types/node@14.17.6
76 silly decomposeActions finalize @types/node@14.17.6
77 silly decomposeActions refresh-package-json @types/node@14.17.6
78 silly decomposeActions fetch debug@4.3.2
79 silly decomposeActions extract debug@4.3.2
80 silly decomposeActions preinstall debug@4.3.2
81 silly decomposeActions build debug@4.3.2
82 silly decomposeActions install debug@4.3.2
83 silly decomposeActions postinstall debug@4.3.2
84 silly decomposeActions finalize debug@4.3.2
85 silly decomposeActions refresh-package-json debug@4.3.2
86 silly decomposeActions fetch netstring@0.3.0
87 silly decomposeActions extract netstring@0.3.0
88 silly decomposeActions preinstall netstring@0.3.0
89 silly decomposeActions build netstring@0.3.0
90 silly decomposeActions install netstring@0.3.0
91 silly decomposeActions postinstall netstring@0.3.0
92 silly decomposeActions finalize netstring@0.3.0
93 silly decomposeActions refresh-package-json netstring@0.3.0
94 silly decomposeActions fetch random-number@0.0.9
95 silly decomposeActions extract random-number@0.0.9
96 silly decomposeActions preinstall random-number@0.0.9
97 silly decomposeActions build random-number@0.0.9
98 silly decomposeActions install random-number@0.0.9
99 silly decomposeActions postinstall random-number@0.0.9
100 silly decomposeActions finalize random-number@0.0.9
101 silly decomposeActions refresh-package-json random-number@0.0.9
102 silly decomposeActions fetch supports-color@9.0.2
103 silly decomposeActions extract supports-color@9.0.2
104 silly decomposeActions preinstall supports-color@9.0.2
105 silly decomposeActions build supports-color@9.0.2
106 silly decomposeActions install supports-color@9.0.2
107 silly decomposeActions postinstall supports-color@9.0.2
108 silly decomposeActions finalize supports-color@9.0.2
109 silly decomposeActions refresh-package-json supports-color@9.0.2
110 silly decomposeActions fetch mediasoup@3.8.0
111 silly decomposeActions extract mediasoup@3.8.0
112 silly decomposeActions preinstall mediasoup@3.8.0
113 silly decomposeActions build mediasoup@3.8.0
114 silly decomposeActions install mediasoup@3.8.0
115 silly decomposeActions postinstall mediasoup@3.8.0
116 silly decomposeActions finalize mediasoup@3.8.0
117 silly decomposeActions refresh-package-json mediasoup@3.8.0
118 silly install executeActions
119 silly doSerial global-install 64
120 verbose correctMkdir /root/.npm/_locks correctMkdir not in flight; initializing
121 verbose lock using /root/.npm/_locks/staging-72a5d9c987365844.lock for /root/webrtc/mediasoup-sample-app/node_modules/.staging
122 silly doParallel extract 8
123 silly extract has-flag@5.0.1
124 silly extract ms@2.1.2
125 silly extract @types/node@14.17.6
126 silly extract debug@4.3.2
127 silly extract netstring@0.3.0
128 silly extract random-number@0.0.9
129 silly extract supports-color@9.0.2
130 silly extract mediasoup@3.8.0
131 silly tarball trying has-flag@^5.0.0 by hash: sha512-CsNUt5x9LUdx6hnk/E2SZLsDyvfqANZSUq4+D3D8RzDJ2M+HDTIkF60ibS1vHaK55vzgiZw1bEPFG9yH7l33wA==
132 silly tarball trying ms@2.1.2 by hash: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
133 silly tarball trying @types/node@^14.14.43 by hash: sha512-iBxsxU7eswQDGhlr3AiamBxOssaYxbM+NKXVil8jg9yFXvrfEFbDumLD/2dMTB+zYyg7w+Xjt8yuxfdbUHAtcQ==
134 silly tarball trying debug@^4.3.2 by hash: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
135 silly tarball trying netstring@^0.3.0 by hash: sha1-ho3FsgxY0/cwVTHUk2jqqr0ZtxI=
136 silly tarball trying random-number@^0.0.9 by hash: sha512-ipG3kRCREi/YQpi2A5QGcvDz1KemohovWmH6qGfboVyyGdR2t/7zQz0vFxrfxpbHQgPPdtVlUDaks3aikD1Ljw==
137 silly tarball trying supports-color@^9.0.2 by hash: sha512-ii6tc8ImGFrgMPYq7RVAMKkhPo9vk8uA+D3oKbJq/3Pk2YSMv1+9dUAesa9UxMbxBTvxwKTQffBahNVNxEvM8Q==
138 silly tarball trying mediasoup@3 by hash: sha512-am2dcZl6l1K4gXLVS4/NPdRMouGeia92FS6d5ub5frRjtfZcySPvvIBUu4WdTSvXDQgtxr2eBI/a2p4bwIQJ9g==
139 silly extract ms@2.1.2 extracted to /root/webrtc/mediasoup-sample-app/node_modules/.staging/ms-10069fac (112ms)
140 silly extract has-flag@^5.0.0 extracted to /root/webrtc/mediasoup-sample-app/node_modules/.staging/has-flag-7476c579 (112ms)
141 silly extract supports-color@^9.0.2 extracted to /root/webrtc/mediasoup-sample-app/node_modules/.staging/supports-color-60bf8d6a (113ms)
142 silly extract netstring@^0.3.0 extracted to /root/webrtc/mediasoup-sample-app/node_modules/.staging/netstring-1c90a0e2 (115ms)
143 silly extract random-number@^0.0.9 extracted to /root/webrtc/mediasoup-sample-app/node_modules/.staging/random-number-4d5b56c3 (115ms)
144 silly extract debug@^4.3.2 extracted to /root/webrtc/mediasoup-sample-app/node_modules/.staging/debug-589f045b (115ms)
145 silly extract @types/node@^14.14.43 extracted to /root/webrtc/mediasoup-sample-app/node_modules/.staging/@types/node-85c4f4ac (140ms)
146 timing audit submit Completed in 320ms
147 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 320ms
148 timing audit body Completed in 1ms
149 silly extract mediasoup@3 extracted to /root/webrtc/mediasoup-sample-app/node_modules/.staging/mediasoup-6507de6a (5706ms)
150 timing action:extract Completed in 5715ms
151 silly doReverseSerial unbuild 64
152 silly doSerial remove 64
153 silly doSerial move 64
154 silly doSerial finalize 64
155 silly finalize /root/webrtc/mediasoup-sample-app/node_modules/has-flag
156 silly finalize /root/webrtc/mediasoup-sample-app/node_modules/mediasoup/node_modules/ms
157 silly finalize /root/webrtc/mediasoup-sample-app/node_modules/@types/node
158 silly finalize /root/webrtc/mediasoup-sample-app/node_modules/mediasoup/node_modules/debug
159 silly finalize /root/webrtc/mediasoup-sample-app/node_modules/netstring
160 silly finalize /root/webrtc/mediasoup-sample-app/node_modules/random-number
161 silly finalize /root/webrtc/mediasoup-sample-app/node_modules/supports-color
162 silly finalize /root/webrtc/mediasoup-sample-app/node_modules/mediasoup
163 timing action:finalize Completed in 22ms
164 silly doParallel refresh-package-json 8
165 silly refresh-package-json /root/webrtc/mediasoup-sample-app/node_modules/has-flag
166 silly refresh-package-json /root/webrtc/mediasoup-sample-app/node_modules/mediasoup/node_modules/ms
167 silly refresh-package-json /root/webrtc/mediasoup-sample-app/node_modules/@types/node
168 silly refresh-package-json /root/webrtc/mediasoup-sample-app/node_modules/mediasoup/node_modules/debug
169 silly refresh-package-json /root/webrtc/mediasoup-sample-app/node_modules/netstring
170 silly refresh-package-json /root/webrtc/mediasoup-sample-app/node_modules/random-number
171 silly refresh-package-json /root/webrtc/mediasoup-sample-app/node_modules/supports-color
172 silly refresh-package-json /root/webrtc/mediasoup-sample-app/node_modules/mediasoup
173 timing action:refresh-package-json Completed in 39ms
174 silly doParallel preinstall 8
175 silly preinstall has-flag@5.0.1
176 info lifecycle has-flag@5.0.1~preinstall: has-flag@5.0.1
177 silly preinstall ms@2.1.2
178 info lifecycle ms@2.1.2~preinstall: ms@2.1.2
179 silly preinstall @types/node@14.17.6
180 info lifecycle @types/node@14.17.6~preinstall: @types/node@14.17.6
181 silly preinstall debug@4.3.2
182 info lifecycle debug@4.3.2~preinstall: debug@4.3.2
183 silly preinstall netstring@0.3.0
184 info lifecycle netstring@0.3.0~preinstall: netstring@0.3.0
185 silly preinstall random-number@0.0.9
186 info lifecycle random-number@0.0.9~preinstall: random-number@0.0.9
187 silly preinstall supports-color@9.0.2
188 info lifecycle supports-color@9.0.2~preinstall: supports-color@9.0.2
189 silly preinstall mediasoup@3.8.0
190 info lifecycle mediasoup@3.8.0~preinstall: mediasoup@3.8.0
191 timing action:preinstall Completed in 2ms
192 silly doSerial build 64
193 silly build has-flag@5.0.1
194 info linkStuff has-flag@5.0.1
195 silly linkStuff has-flag@5.0.1 has /root/webrtc/mediasoup-sample-app/node_modules as its parent node_modules
196 silly build ms@2.1.2
197 info linkStuff ms@2.1.2
198 silly linkStuff ms@2.1.2 has /root/webrtc/mediasoup-sample-app/node_modules/mediasoup/node_modules as its parent node_modules
199 silly build @types/node@14.17.6
200 info linkStuff @types/node@14.17.6
201 silly linkStuff @types/node@14.17.6 has /root/webrtc/mediasoup-sample-app/node_modules as its parent node_modules
202 silly build debug@4.3.2
203 info linkStuff debug@4.3.2
204 silly linkStuff debug@4.3.2 has /root/webrtc/mediasoup-sample-app/node_modules/mediasoup/node_modules as its parent node_modules
205 silly build netstring@0.3.0
206 info linkStuff netstring@0.3.0
207 silly linkStuff netstring@0.3.0 has /root/webrtc/mediasoup-sample-app/node_modules as its parent node_modules
208 silly build random-number@0.0.9
209 info linkStuff random-number@0.0.9
210 silly linkStuff random-number@0.0.9 has /root/webrtc/mediasoup-sample-app/node_modules as its parent node_modules
211 silly build supports-color@9.0.2
212 info linkStuff supports-color@9.0.2
213 silly linkStuff supports-color@9.0.2 has /root/webrtc/mediasoup-sample-app/node_modules as its parent node_modules
214 silly build mediasoup@3.8.0
215 info linkStuff mediasoup@3.8.0
216 silly linkStuff mediasoup@3.8.0 has /root/webrtc/mediasoup-sample-app/node_modules as its parent node_modules
217 timing action:build Completed in 3ms
218 silly doSerial global-link 64
219 silly doParallel update-linked 0
220 silly doSerial install 64
221 silly install has-flag@5.0.1
222 info lifecycle has-flag@5.0.1~install: has-flag@5.0.1
223 silly install ms@2.1.2
224 info lifecycle ms@2.1.2~install: ms@2.1.2
225 silly install @types/node@14.17.6
226 info lifecycle @types/node@14.17.6~install: @types/node@14.17.6
227 silly install debug@4.3.2
228 info lifecycle debug@4.3.2~install: debug@4.3.2
229 silly install netstring@0.3.0
230 info lifecycle netstring@0.3.0~install: netstring@0.3.0
231 silly install random-number@0.0.9
232 info lifecycle random-number@0.0.9~install: random-number@0.0.9
233 silly install supports-color@9.0.2
234 info lifecycle supports-color@9.0.2~install: supports-color@9.0.2
235 silly install mediasoup@3.8.0
236 info lifecycle mediasoup@3.8.0~install: mediasoup@3.8.0
237 timing action:install Completed in 2ms
238 silly doSerial postinstall 64
239 silly postinstall has-flag@5.0.1
240 info lifecycle has-flag@5.0.1~postinstall: has-flag@5.0.1
241 silly postinstall ms@2.1.2
242 info lifecycle ms@2.1.2~postinstall: ms@2.1.2
243 silly postinstall @types/node@14.17.6
244 info lifecycle @types/node@14.17.6~postinstall: @types/node@14.17.6
245 silly postinstall debug@4.3.2
246 info lifecycle debug@4.3.2~postinstall: debug@4.3.2
247 silly postinstall netstring@0.3.0
248 info lifecycle netstring@0.3.0~postinstall: netstring@0.3.0
249 silly postinstall random-number@0.0.9
250 info lifecycle random-number@0.0.9~postinstall: random-number@0.0.9
251 silly postinstall supports-color@9.0.2
252 info lifecycle supports-color@9.0.2~postinstall: supports-color@9.0.2
253 silly postinstall mediasoup@3.8.0
254 info lifecycle mediasoup@3.8.0~postinstall: mediasoup@3.8.0
255 verbose lifecycle mediasoup@3.8.0~postinstall: unsafe-perm in lifecycle false
256 verbose lifecycle mediasoup@3.8.0~postinstall: PATH: /root/webrtc/node-v14.17.4-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/root/webrtc/mediasoup-sample-app/node_modules/mediasoup/node_modules/.bin:/root/webrtc/mediasoup-sample-app/node_modules/.bin:/opt/rh/devtoolset-9/root/usr/bin:/root/webrtc/node-v14.17.4-linux-x64/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/godata/go/bin
257 verbose lifecycle mediasoup@3.8.0~postinstall: CWD: /root/webrtc/mediasoup-sample-app/node_modules/mediasoup
258 silly lifecycle mediasoup@3.8.0~postinstall: Args: [ '-c', 'node npm-scripts.js postinstall' ]
259 silly lifecycle mediasoup@3.8.0~postinstall: Returned: code: 1  signal: null
260 info lifecycle mediasoup@3.8.0~postinstall: Failed to exec postinstall script
261 timing action:postinstall Completed in 881ms
262 verbose unlock done using /root/.npm/_locks/staging-72a5d9c987365844.lock for /root/webrtc/mediasoup-sample-app/node_modules/.staging
263 timing stage:rollbackFailedOptional Completed in 1358ms
264 timing stage:runTopLevelLifecycles Completed in 11260ms
265 silly saveTree mediasoup-sample-app@1.2.2
265 silly saveTree ├─┬ express@4.17.1
265 silly saveTree │ ├─┬ accepts@1.3.7
......
265 silly saveTree └── typescript@4.3.5
266 warn mediasoup-sample-app@1.2.2 No repository field.
267 verbose stack Error: mediasoup@3.8.0 postinstall: `node npm-scripts.js postinstall`
267 verbose stack Exit status 1
267 verbose stack     at EventEmitter.<anonymous> (/root/webrtc/node-v14.17.4-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
267 verbose stack     at EventEmitter.emit (events.js:400:28)
267 verbose stack     at ChildProcess.<anonymous> (/root/webrtc/node-v14.17.4-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
267 verbose stack     at ChildProcess.emit (events.js:400:28)
267 verbose stack     at maybeClose (internal/child_process.js:1055:16)
267 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
268 verbose pkgid mediasoup@3.8.0
269 verbose cwd /root/webrtc/mediasoup-sample-app
270 verbose Linux 4.4.228-2.el7.elrepo.x86_64
271 verbose argv "/root/webrtc/node-v14.17.4-linux-x64/bin/node" "/root/webrtc/node-v14.17.4-linux-x64/bin/npm" "i" "mediasoup"
272 verbose node v14.17.4
273 verbose npm  v6.14.14
274 error code ELIFECYCLE
275 error errno 1
276 error mediasoup@3.8.0 postinstall: `node npm-scripts.js postinstall`
276 error Exit status 1
277 error Failed at the mediasoup@3.8.0 postinstall script.
277 error This is probably not a problem with npm. There is likely additional logging output above.
278 verbose exit [ 1, true ]

When try to npm install deps of mediasoup demo, happens into the similar problem:


gyp WARN EACCES current user does not have permission to access the dev dir "/root/.cache/node-gyp/14.17.4"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/webrtc/mediasoup-demo/server/node_modules/heapdump/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/webrtc/mediasoup-demo/server/node_modules/heapdump/.node-gyp'
gyp ERR! System Linux 4.4.228-2.el7.elrepo.x86_64
gyp ERR! command "/opt/webrtc/node-v14.17.4-linux-x64/bin/node" "/opt/webrtc/node-v14.17.4-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/webrtc/mediasoup-demo/server/node_modules/heapdump
gyp ERR! node -v v14.17.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! heapdump@0.3.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the heapdump@0.3.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Problem fixed, needs sudo:

sudo npm install

You shouldn’t need root access to install mediasoup, but you are installing it under /root/ directory, that’s why the system forces you to have such access rights.

Don’t install anything under /root/.

3 Likes