节点opencv模块安装错误

时间:2016-03-10 16:12:57

标签: node.js opencv cylon.js

我正在尝试使用cylonjs在AR无人机1.0上使用opencv实现计算机视觉,但我似乎无法安装cylon-opencv模块,但我需要的其他模块工作正常。我也试过安装node-opencv模块,但也失败了。这是我得到的错误

> opencv@5.0.0 install /Users/Pete/node_modules/opencv
> node-pre-gyp install --fallback-to-build



CXX(target) Release/obj.target/opencv/src/init.o
  CXX(target) Release/obj.target/opencv/src/Matrix.o
  CXX(target) Release/obj.target/opencv/src/OpenCV.o
  CXX(target) Release/obj.target/opencv/src/CascadeClassifierWrap.o
  CXX(target) Release/obj.target/opencv/src/Contours.o
  CXX(target) Release/obj.target/opencv/src/Point.o
  CXX(target) Release/obj.target/opencv/src/VideoCaptureWrap.o
  CXX(target) Release/obj.target/opencv/src/CamShift.o
  CXX(target) Release/obj.target/opencv/src/HighGUI.o
  CXX(target) Release/obj.target/opencv/src/FaceRecognizer.o
../src/FaceRecognizer.cc:5:2: warning: TODO: port me to OpenCV 3 [-W#warnings]
#warning TODO: port me to OpenCV 3
 ^
1 warning generated.
  CXX(target) Release/obj.target/opencv/src/Features2d.o
  CXX(target) Release/obj.target/opencv/src/BackgroundSubtractor.o
../src/BackgroundSubtractor.cc:7:2: warning: TODO: port me to OpenCV 3
      [-W#warnings]
#warning TODO: port me to OpenCV 3
 ^
1 warning generated.
  CXX(target) Release/obj.target/opencv/src/Constants.o
  CXX(target) Release/obj.target/opencv/src/Calib3D.o
  CXX(target) Release/obj.target/opencv/src/ImgProc.o
  CXX(target) Release/obj.target/opencv/src/Stereo.o
../src/Stereo.cc:5:2: warning: TODO: port me to OpenCV 3 [-W#warnings]
#warning TODO: port me to OpenCV 3
 ^
1 warning generated.
  CXX(target) Release/obj.target/opencv/src/LDAWrap.o
../src/LDAWrap.cc:4:2: warning: TODO: port me to OpenCV 3 [-W#warnings]
#warning TODO: port me to OpenCV 3
 ^
1 warning generated.
  SOLINK_MODULE(target) Release/opencv.node
ld: library not found for -lippicv
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/opencv.node] Error 1
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:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/Cellar/node/5.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/Pete/node_modules/opencv/build/opencv/v5.0.0/Release/node-v47-darwin-x64/opencv.node" "--module_name=opencv" "--module_path=/Users/Pete/node_modules/opencv/build/opencv/v5.0.0/Release/node-v47-darwin-x64"
gyp ERR! cwd /Users/Pete/node_modules/opencv
gyp ERR! node -v v5.8.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/Users/Pete/node_modules/opencv/build/opencv/v5.0.0/Release/node-v47-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/Pete/node_modules/opencv/build/opencv/v5.0.0/Release/node-v47-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Pete/node_modules/opencv/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:100:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:850:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Darwin 15.3.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/5.8.0/bin/node" "/Users/Pete/node_modules/opencv/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/Pete/node_modules/opencv
node-pre-gyp ERR! node -v v5.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.17
node-pre-gyp ERR! not ok 
Failed to execute 'node-gyp build --fallback-to-build --module=/Users/Pete/node_modules/opencv/build/opencv/v5.0.0/Release/node-v47-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/Pete/node_modules/opencv/build/opencv/v5.0.0/Release/node-v47-darwin-x64' (1)
/Users/Pete
├── cylon@1.2.0 
└── cylon-ardrone@0.21.0 

npm WARN enoent ENOENT: no such file or directory, open '/Users/Pete/package.json'
npm WARN Pete No description
npm WARN Pete No repository field.
npm WARN Pete No README data
npm WARN Pete No license field.
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/5.8.0/bin/node" "/usr/local/bin/npm" "install" "cylon-opencv"
npm ERR! node v5.8.0
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE

npm ERR! opencv@5.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the opencv@5.0.0 install script 'node-pre-gyp install --fallback-to-build'.
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 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 information on how to open an issue for this project with:
npm ERR!     npm bugs opencv
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls opencv
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Pete/npm-debug.log

1 个答案:

答案 0 :(得分:0)

首先缺少的库似乎是: lippicv

ld: library not found for -lippicv
clang: error: linker command failed with exit code 1 (use -v to see invocation)