FUXA安装时,下载node-v18.16.0-headers.tar.gz失败,报连接超时错误,导致安装失败。
详细错误信息如下:
1024 error gyp ERR! configure error 1024 error gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz failed, reason: connect ETIMEDOUT 104.20.23.46:443 1024 error gyp ERR! stack at ClientRequest.<anonymous> (/root/FUXA-1.1.13/server/node_modules/minipass-fetch/lib/index.js:110:14) 1024 error gyp ERR! stack at ClientRequest.emit (node:events:513:28) 1024 error gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:502:9) 1024 error gyp ERR! stack at TLSSocket.emit (node:events:525:35) 1024 error gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8) 1024 error gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3) 1024 error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 1024 error gyp ERR! System Linux 3.10.0-1160.90.1.el7.x86_64 1024 error gyp ERR! command "/usr/local/bin/node" "/root/FUXA-1.1.13/server/node_modules/.bin/node-gyp" "rebuild" 1024 error gyp ERR! cwd /root/FUXA-1.1.13/server/node_modules/node-snap7 1024 error gyp ERR! node -v v18.16.0 1024 error gyp ERR! node-gyp -v v8.4.1 1024 error gyp ERR! not ok
原因为node-gyp环境变量设置中的默认源码地址“https://nodejs.org/download/release/”在国内不可以访问,需要手动修改该地址。
在命令行输入如下命令,修改源码地址为国内镜像地址:
export npm_config_disturl=https://registry.npmmirror.com/-/binary/node/
问题解决!