首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >执行node-gyp重建时,node-libxml-xsd失败,并显示"...xmljs.node:文件无法识别:文件格式无法识别“

执行node-gyp重建时,node-libxml-xsd失败,并显示"...xmljs.node:文件无法识别:文件格式无法识别“
EN

Stack Overflow用户
提问于 2018-06-07 05:05:04
回答 1查看 358关注 0票数 0

尝试为Meteor应用创建Docker容器时,尝试编译node-libxml-xsd节点-gyp失败,并显示以下错误:

<command-line>:0:0: note: this is the location of the previous definition
  SOLINK_MODULE(target) Release/obj.target/node-libxml-xsd.node
/home/docker/data/app/programs/server/npm/node_modules/libxmljs-mt/build/Release/xmljs.node: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/node-libxml-xsd.node] Error 1
node-libxml-xsd.target.mk:133: recipe for target 'Release/obj.target/node-libxml-xsd.node' failed
make: Leaving directory '/home/docker/data/app/programs/server/npm/node_modules/libxml-xsd/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.9.93-boot2docker
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/docker/data/app/programs/server/npm/node_modules/libxml-xsd
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! libxml-xsd@0.5.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libxml-xsd@0.5.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

我正在使用Node8.9.4在Mac (boot2docker)上构建它。有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2018-06-07 05:05:04

我找到了答案,所以我发布给后人:

原来libxml-xsd不会首先重新构建libxmljs-mt,所以在运行npm install之前,我需要运行:

cd npm && npm rebuild --unsafe-perm libxmljs-mt
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50729586

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档