yanyiwu / nodejieba

"结巴"中文分词的Node.js版本
MIT License
3.06k stars 278 forks source link

服务端安装时失败,configure过程中为什么会访问外网的IP? #184

Closed janckerchen closed 1 month ago

janckerchen commented 3 years ago

在环境受限的服务器端安装nodejieba,configure阶段遇到错误

[info-35] > nodejieba@2.5.1 install /export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/nodejieba
[info-36] > node-pre-gyp install --fallback-to-build
[info-37] 
[info-38] node-pre-gyp WARN Using needle for node-pre-gyp https download 
[info-39] node-pre-gyp WARN Pre-built binaries not installable for nodejieba@2.5.1 and node@12.19.0 (node-v72 ABI, glibc) (falling back to source compile with node-gyp) 
[info-40] node-pre-gyp WARN Hit error socket hang up 
[info-41] gyp WARN install got an error, rolling back install
[info-42] gyp ERR! configure error 
[info-43] gyp ERR! stack Error: connect ETIMEDOUT 104.20.23.46:443
[info-44] gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1145:16)
[info-45] gyp ERR! System Linux 3.10.0-693.el7.x86_64
[info-46] gyp ERR! command "/export/wy/node-v12.19.0-linux-x64/bin/node" "/export/wy/node-v12.19.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/nodejieba/build/Release/nodejieba.node" "--module_name=nodejieba" "--module_path=/export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/nodejieba/build/Release" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
[info-47] gyp ERR! cwd /export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/nodejieba
[info-48] gyp ERR! node -v v12.19.0
[info-49] gyp ERR! node-gyp -v v5.1.0
[info-50] gyp ERR! not ok 
[info-51] node-pre-gyp ERR! build error 
[info-52] node-pre-gyp ERR! stack Error: Failed to execute '/export/wy/node-v12.19.0-linux-x64/bin/node /export/wy/node-v12.19.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/nodejieba/build/Release/nodejieba.node --module_name=nodejieba --module_path=/export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/nodejieba/build/Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
[info-53] node-pre-gyp ERR! stack at ChildProcess. (/export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
[info-54] node-pre-gyp ERR! stack at ChildProcess.emit (events.js:314:20)
[info-55] node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
[info-56] node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
[info-57] node-pre-gyp ERR! System Linux 3.10.0-693.el7.x86_64
[info-58] node-pre-gyp ERR! command "/export/wy/node-v12.19.0-linux-x64/bin/node" "/export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
[info-59] node-pre-gyp ERR! cwd /export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/nodejieba
[info-60] node-pre-gyp ERR! node -v v12.19.0
[info-61] node-pre-gyp ERR! node-pre-gyp -v v0.14.0
[info-62] node-pre-gyp ERR! not ok 
[info-63] Failed to execute '/export/wy/node-v12.19.0-linux-x64/bin/node /export/wy/node-v12.19.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/nodejieba/build/Release/nodejieba.node --module_name=nodejieba --module_path=/export/wy/gaea_workspace/prj_jci/src/piaook-search-server_14917_1432980_20201224095839-1577445/workspace/node_modules/nodejieba/build/Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
[info-64] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
[info-65] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[info-66] 
[info-67] npm ERR! code ELIFECYCLE
[info-68] npm ERR! errno 1
[info-69] npm ERR! nodejieba@2.5.1 install: `node-pre-gyp install --fallback-to-build`
[info-70] npm ERR! Exit status 1
[info-71] npm ERR! 
[info-72] npm ERR! Failed at the nodejieba@2.5.1 install script.
[info-73] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[info-74] 
[info-75] npm ERR! A complete log of this run can be found in:
[info-76] npm ERR! /home/wy/gaea_npm_cache/.npm/_logs/2020-12-24T02_01_15_272Z-debug.log
[info-77] [-] 10:01:15 error(@77): /home/wy/node-v12.19.0-linux-x64/bin/npm install failed!
[info-78] ***************

日志第9行,为何会访问外网IP?

[info-42] gyp ERR! configure error 
[info-43] gyp ERR! stack Error: connect ETIMEDOUT 104.20.23.46:443

104.20.23.46 好像属于 Cloudflare

civerzhang commented 3 years ago

一模一样的报错,咋搞? nodejieba@2.5.1 node@10.16.0

ps:这个报错好像不影响install的执行状态?看最后还是出了 Exit status 1

github-actions[bot] commented 1 month ago

This issue has not been updated for over 3 years and will be marked as stale. If the issue still exists, please comment or update the issue, otherwise it will be closed after 7 days.

github-actions[bot] commented 1 month ago

This issue has been automatically closed due to inactivity. If the issue still exists, please reopen it.