libxmljs: Build Failure on Linux

Getting the following:

gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 4.4.39-1-MANJARO gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–loglevel=http” “–module=/home/phil/src/swa-dashboard/node_modules/libxmljs/build/Release/xmljs.node” “–module_name=xmljs” “–module_path=/home/phil/src/swa-dashboard/node_modules/libxmljs/build/Release” gyp ERR! cwd /home/phil/src/swa-dashboard/node_modules/libxmljs gyp ERR! node -v v7.3.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/home/phil/src/swa-dashboard/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/home/phil/src/swa-dashboard/node_modules/libxmljs/build/Release’ (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/phil/src/swa-dashboard/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:106:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:885:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) node-pre-gyp ERR! System Linux 4.4.39-1-MANJARO node-pre-gyp ERR! command “/usr/bin/node” “/home/phil/src/swa-dashboard/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build” “–loglevel” “http” node-pre-gyp ERR! cwd /home/phil/src/swa-dashboard/node_modules/libxmljs node-pre-gyp ERR! node -v v7.3.0 node-pre-gyp ERR! node-pre-gyp -v v0.6.32 node-pre-gyp ERR! not ok Failed to execute ‘/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/home/phil/src/swa-dashboard/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/home/phil/src/swa-dashboard/node_modules/libxmljs/build/Release’ (1) npm ERR! Linux 4.4.39-1-MANJARO npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “link” npm ERR! node v7.3.0 npm ERR! npm v4.1.1 npm ERR! code ELIFECYCLE

npm ERR! libxmljs@0.18.4 install: node-pre-gyp install --fallback-to-build --loglevel http npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the libxmljs@0.18.4 install script ‘node-pre-gyp install --fallback-to-build --loglevel http’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the libxmljs package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build --loglevel http

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 21 (3 by maintainers)

Most upvoted comments

I had the same issue on the Linux Subsystem for Windows. I have Node V 6.10.2 and NPM v.3.10.10. The Linux subsystem is the Ubuntu 16.04 operating system. Upon closely looking at the logs I figured that it was trying to run make command and run make: cc and make: g++. These were not found on my Linux subsystem and hence it failed to install.

I installed build-essentials, gcc, g++ packages and the error went away. apt-get install build-essentials gcc g++