在Windows 7和节点版本@ 6中安装opencv时出错

时间:2017-05-06 05:33:49

标签: node.js windows opencv

在Windows 7和节点版本@ 6

中安装opencv时出现以下错误
> opencv@6.0.0 install C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Relea
se/node-v48-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for opencv@6.0.0 and node@6.7.0 (node-v48 ABI) (fal
ling back to source compile with node-gyp)

C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv>if not defined npm_config_node_g
yp (node "C:\Users\admin1\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_module
s\node-gyp\bin\node-gyp.js" clean )  else (node "" clean )

C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv>if not defined npm_config_node_g
yp (node "C:\Users\admin1\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_module
s\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\admin1\Desktop\video_p
ost\video_post\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64\opencv.node --mo
dule_name=opencv --module_path=C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv\b
uild\opencv\v6.0.0\Release\node-v48-win32-x64 )  else (node "" configure --fallback-to-build --mod
ule=C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv\build\opencv\v6.0.0\Release\
node-v48-win32-x64\opencv.node --module_name=opencv --module_path=C:\Users\admin1\Desktop\video_po
st\video_post\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64 )
C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv\utils\find-opencv.js:39
            throw new Error("ERROR: OPENCV_DIR doesn't seem to be defined");
            ^

Error: ERROR: OPENCV_DIR doesn't seem to be defined
    at C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv\utils\find-opencv.js:39:1
9
    at ChildProcess.exithandler (child_process.js:197:7)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
gyp: Call to 'node utils/find-opencv.js --cflags' returned exit status 1 while in binding.gyp. whi
le trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\admin1\AppData\Roaming\npm\node_modules\npm\
node_modules\node-gyp\lib\configure.js:336:16)
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 Windows_NT 6.1.7600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin1\\AppData\\Roaming\\npm\\
node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--
module=C:\\Users\\admin1\\Desktop\\video_post\\video_post\\node_modules\\opencv\\build\\opencv\\v6
.0.0\\Release\\node-v48-win32-x64\\opencv.node" "--module_name=opencv" "--module_path=C:\\Users\\a
dmin1\\Desktop\\video_post\\video_post\\node_modules\\opencv\\build\\opencv\\v6.0.0\\Release\\node
-v48-win32-x64"
gyp ERR! cwd C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv
gyp ERR! node -v v6.7.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --mod
ule=C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv\build\opencv\v6.0.0\Release\
node-v48-win32-x64\opencv.node --module_name=opencv --module_path=C:\Users\admin1\Desktop\video_po
st\video_post\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\admin1\Desktop\video_post\video_
post\node_modules\opencv\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:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:
5)
node-pre-gyp ERR! System Windows_NT 6.1.7600
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin1\\Desktop\\video
_post\\video_post\\node_modules\\opencv\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install"
"--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\admin1\Desktop\video_post\video_post\node_modules\opencv
node-pre-gyp ERR! node -v v6.7.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\admin1\Desktop\vid
eo_post\video_post\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64\opencv.node
--module_name=opencv --module_path=C:\Users\admin1\Desktop\video_post\video_post\node_modules\open
cv\build\opencv\v6.0.0\Release\node-v48-win32-x64' (1)
npm WARN video_post@ No description
npm WARN video_post@ No repository field.
npm WARN video_post@ No license field.
npm WARN In opencv@6.0.0 replacing bundled version of node-pre-gyp with node-pre-gyp@0.6.34
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv@6.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv@6.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! A complete log of this run can be found in:
npm ERR!     C:\Users\admin1\AppData\Roaming\npm-cache\_logs\2017-05-06T05_25_57_891Z-debug.log

0 个答案:

没有答案
相关问题