【xviz】./scripts/run-kitti-example.sh执行过程中报错gyp ERR! Node-gyp failed to build your package.

xviz github:https://github.com/uber/xviz

xviz github的的指南中有以下步骤:

# Download KITTI data
$ ./scripts/download-kitti-data.sh

# Convert KITTI data if necessary and run the XVIZ Server and Client
$ ./scripts/run-kitti-example.sh

其中在转换kitti数据为XVIZ的数据过程中,执行./scripts/run-kitti-example.sh报错“gyp ERR! Node-gyp failed to build your package”,详细如下:

004:~/myworkspaces/vueworkspace/xviz$ ./scripts/run-kitti-example.sh
Generating default KITTI XVIZ data
yarn install v1.22.15
warning package.json: No license field
warning jskitti@1.1.0: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/3] ⠈ sharp
[2/3] ⠈ node-expat
error /home/myworkspaces/vueworkspace/xviz/examples/converters/kitti/node_modules/node-expat: Command failed.
Exit code: 7
Command: node-gyp rebuild
Arguments:
Directory: /home/myworkspaces/vueworkspace/xviz/examples/converters/kitti/node_modules/node-expat
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@8.2.0
gyp info using node@8.10.0 | linux | x64
gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3"
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
gyp ERR! stack     at Object.promisify (internal/util.js:209:11)
gyp ERR! stack     at Object.<anonymous> (/home/lwx1042024/.config/yarn/global/node_modules/node-gyp/lib/install.js:15:29)
gyp ERR! stack     at Module._compile (module.js:652:30)
gyp ERR! stack     at Object.Module._extensions..js (module.js:663:10)
gyp ERR! stack     at Module.load (module.js:565:32)
gyp ERR! stack     at tryModuleLoad (module.js:505:12)
gyp ERR! stack     at Function.Module._load (module.js:497:3)
gyp ERR! stack     at Module.require (module.js:596:17)
gyp ERR! stack     at require (internal/module.js:11:18)
gyp ERR! stack     at Object.self.commands.(anonymous function) [as install] (/home/.config/yarn/global/node_modules/node-gyp/lib/node-gyp.js:41:14)
gyp ERR! System Linux 4.15.0-144-generic
gyp ERR! command "/usr/bin/node" "/home/.yarn/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/myworkspaces/vueworkspace/xviz/examples/converters/kitti/node_modules/node-expat
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v8.2.0
gyp ERR! Node-gyp failed to build your package.

解决方法,进入xviz/examples/converters/kitti目录,执行sudo yarn add node-gyp -g:

004:~/myworkspaces/vueworkspace/xviz/examples/converters/kitti$ sudo yarn add  node-gyp -g

安装完成后再执行./scripts/run-kitti-example.sh即可正常生成xviz的glb文件:

 

posted @ 2021-10-13 15:43  vickylinj  阅读(551)  评论(0编辑  收藏  举报