node-opencv: installation problem
Hello, i apologise for the disturbance, but i have spent one week trying to install opencv on node. I tryed with different version of node and different version of opencv, but when i prompted the command “npm install opencv” i always got the error above. Could you help me please because i need it to proceed with my thesis? I’m looking forward to hearing from you. Thank you!
Luca Graglia
ERROR:
labuser@labuser-VirtualBox:~$ npm install opencv
opencv@3.0.0 install /home/labuser/node_modules/opencv node-pre-gyp install --fallback-to-build
make: Entering directory /home/labuser/node_modules/opencv/build' CXX(target) Release/obj.target/opencv/src/init.o In file included from ../src/init.cc:1:0: ../src/OpenCV.h:9:23: fatal error: opencv/cv.h: No such file or directory compilation terminated. make: *** [Release/obj.target/opencv/src/init.o] Error 1 make: Leaving directory
/home/labuser/node_modules/opencv/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:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.2.0-29-generic-pae
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” “–name=opencv” “–configuration=Release” “–module_name=opencv” “–version=3.0.0” “–major=3” “–runtime=node” “–node_abi=node-v11” “–platform=linux” “–target_platform=linux” “–arch=ia32” “–target_arch=ia32” “–module_main=./lib/opencv” “–host=https://node-opencv.s3.amazonaws.com/” “–module_path=/home/labuser/node_modules/opencv/build/opencv/v3.0.0/Release/node-v11-linux-ia32” “–module=/home/labuser/node_modules/opencv/build/opencv/v3.0.0/Release/node-v11-linux-ia32/opencv.node” “–remote_path=./opencv/v3.0.0/Release/” “–package_name=node-v11-linux-ia32.tar.gz” “–staged_tarball=build/stage/opencv/v3.0.0/Release/node-v11-linux-ia32.tar.gz” “–hosted_path=https://node-opencv.s3.amazonaws.com/opencv/v3.0.0/Release/” “–hosted_tarball=https://node-opencv.s3.amazonaws.com/opencv/v3.0.0/Release/node-v11-linux-ia32.tar.gz”
gyp ERR! cwd /home/labuser/node_modules/opencv
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js rebuild --name=opencv --configuration=Release --module_name=opencv --version=3.0.0 --major=3 --runtime=node --node_abi=node-v11 --platform=linux --target_platform=linux --arch=ia32 --target_arch=ia32 --module_main=./lib/opencv --host=https://node-opencv.s3.amazonaws.com/ --module_path=/home/labuser/node_modules/opencv/build/opencv/v3.0.0/Release/node-v11-linux-ia32 --module=/home/labuser/node_modules/opencv/build/opencv/v3.0.0/Release/node-v11-linux-ia32/opencv.node --remote_path=./opencv/v3.0.0/Release/ --package_name=node-v11-linux-ia32.tar.gz --staged_tarball=build/stage/opencv/v3.0.0/Release/node-v11-linux-ia32.tar.gz --hosted_path=https://node-opencv.s3.amazonaws.com/opencv/v3.0.0/Release/ --hosted_tarball=https://node-opencv.s3.amazonaws.com/opencv/v3.0.0/Release/node-v11-linux-ia32.tar.gz’ (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/labuser/node_modules/opencv/node_modules/node-pre-gyp/lib/util/compile.js:76:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:98:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:756:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:823:5)
node-pre-gyp ERR! System Linux 3.2.0-29-generic-pae
node-pre-gyp ERR! command “node” “/home/labuser/node_modules/opencv/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build”
node-pre-gyp ERR! cwd /home/labuser/node_modules/opencv
node-pre-gyp ERR! node -v v0.10.31
node-pre-gyp ERR! node-pre-gyp -v v0.5.31
node-pre-gyp ERR! not ok
Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js rebuild --name=opencv --configuration=Release --module_name=opencv --version=3.0.0 --major=3 --runtime=node --node_abi=node-v11 --platform=linux --target_platform=linux --arch=ia32 --target_arch=ia32 --module_main=./lib/opencv --host=https://node-opencv.s3.amazonaws.com/ --module_path=/home/labuser/node_modules/opencv/build/opencv/v3.0.0/Release/node-v11-linux-ia32 --module=/home/labuser/node_modules/opencv/build/opencv/v3.0.0/Release/node-v11-linux-ia32/opencv.node --remote_path=./opencv/v3.0.0/Release/ --package_name=node-v11-linux-ia32.tar.gz --staged_tarball=build/stage/opencv/v3.0.0/Release/node-v11-linux-ia32.tar.gz --hosted_path=https://node-opencv.s3.amazonaws.com/opencv/v3.0.0/Release/ --hosted_tarball=https://node-opencv.s3.amazonaws.com/opencv/v3.0.0/Release/node-v11-linux-ia32.tar.gz’ (1)
npm ERR! opencv@3.0.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv@3.0.0 install script.
npm ERR! This is most likely a problem with the opencv 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
npm ERR! You can get their info via:
npm ERR! npm owner ls opencv
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-29-generic-pae npm ERR! command “/usr/local/bin/node” “/usr/local/bin/npm” “install” “opencv” npm ERR! cwd /home/labuser npm ERR! node -v v0.10.31 npm ERR! npm -v 1.4.23 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/labuser/npm-debug.log npm ERR! not ok code 0
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 17
How did you manage to solve this? I’m getting the same error. The binary not being available doesn’t help either.