Skip to content

Instantly share code, notes, and snippets.

@samartioli
Created November 20, 2015 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samartioli/cab08fc26cd2dc80ccaa to your computer and use it in GitHub Desktop.
Save samartioli/cab08fc26cd2dc80ccaa to your computer and use it in GitHub Desktop.
root@b8bad52e873c:/app# npm install --save opencv
npm info it worked if it ends with ok
npm info using npm@3.3.6
npm info using node@v5.0.0
npm info attempt registry request try #1 at 12:48:42 AM
npm http request GET https://registry.npmjs.org/opencv
npm http 200 https://registry.npmjs.org/opencv
npm info retry fetch attempt 1 at 12:48:43 AM
npm info attempt registry request try #1 at 12:48:43 AM
npm http fetch GET https://registry.npmjs.org/opencv/-/opencv-3.2.0.tgz
npm http fetch 200 https://registry.npmjs.org/opencv/-/opencv-3.2.0.tgz
npm info attempt registry request try #1 at 12:48:55 AM
npm http request GET https://registry.npmjs.org/buffers
npm info attempt registry request try #1 at 12:48:55 AM
npm http request GET https://registry.npmjs.org/nan
npm info attempt registry request try #1 at 12:48:55 AM
npm http request GET https://registry.npmjs.org/node-pre-gyp
npm http 200 https://registry.npmjs.org/buffers
npm info retry fetch attempt 1 at 12:48:55 AM
npm info attempt registry request try #1 at 12:48:55 AM
npm http fetch GET https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz
npm http fetch 200 https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz
npm http 200 https://registry.npmjs.org/nan
npm http 200 https://registry.npmjs.org/node-pre-gyp
npm info retry fetch attempt 1 at 12:48:55 AM
npm info attempt registry request try #1 at 12:48:55 AM
npm http fetch GET https://registry.npmjs.org/nan/-/nan-1.9.0.tgz
npm info retry fetch attempt 1 at 12:48:55 AM
npm info attempt registry request try #1 at 12:48:55 AM
npm http fetch GET https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.15.tgz
npm http fetch 200 https://registry.npmjs.org/nan/-/nan-1.9.0.tgz
npm http fetch 200 https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.15.tgz
npm info lifecycle buffers@0.1.1~preinstall: buffers@0.1.1
npm info lifecycle nan@1.9.0~preinstall: nan@1.9.0
npm info lifecycle node-pre-gyp@0.6.15~preinstall: node-pre-gyp@0.6.15
npm info lifecycle opencv@3.2.0~preinstall: opencv@3.2.0
npm info linkStuff buffers@0.1.1
npm info linkStuff nan@1.9.0
npm info linkStuff node-pre-gyp@0.6.15
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp/node_modules/mkdirp
npm info lifecycle mkdirp@0.5.0~preinstall: mkdirp@0.5.0
npm info linkStuff mkdirp@0.5.0
npm info lifecycle mkdirp@0.5.0~install: mkdirp@0.5.0
npm info lifecycle mkdirp@0.5.0~postinstall: mkdirp@0.5.0
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp/node_modules/nopt
npm info lifecycle nopt@3.0.1~preinstall: nopt@3.0.1
npm info linkStuff nopt@3.0.1
npm info lifecycle nopt@3.0.1~install: nopt@3.0.1
npm info lifecycle nopt@3.0.1~postinstall: nopt@3.0.1
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp/node_modules/npmlog
npm info lifecycle npmlog@0.1.1~preinstall: npmlog@0.1.1
npm info linkStuff npmlog@0.1.1
npm info lifecycle npmlog@0.1.1~install: npmlog@0.1.1
npm info lifecycle npmlog@0.1.1~postinstall: npmlog@0.1.1
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp/node_modules/rc
npm info lifecycle rc@0.5.2~preinstall: rc@0.5.2
npm info linkStuff rc@0.5.2
npm info lifecycle rc@0.5.2~install: rc@0.5.2
npm info lifecycle rc@0.5.2~postinstall: rc@0.5.2
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp/node_modules/request
npm info lifecycle request@2.47.0~preinstall: request@2.47.0
npm info linkStuff request@2.47.0
npm info lifecycle request@2.47.0~install: request@2.47.0
npm info lifecycle request@2.47.0~postinstall: request@2.47.0
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp/node_modules/rimraf
npm info lifecycle rimraf@2.2.8~preinstall: rimraf@2.2.8
npm info linkStuff rimraf@2.2.8
npm info lifecycle rimraf@2.2.8~install: rimraf@2.2.8
npm info lifecycle rimraf@2.2.8~postinstall: rimraf@2.2.8
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp/node_modules/semver
npm info lifecycle semver@4.1.0~preinstall: semver@4.1.0
npm info linkStuff semver@4.1.0
npm info lifecycle semver@4.1.0~install: semver@4.1.0
npm info lifecycle semver@4.1.0~postinstall: semver@4.1.0
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp/node_modules/tar
npm info lifecycle tar@1.0.1~preinstall: tar@1.0.1
npm info linkStuff tar@1.0.1
npm info lifecycle tar@1.0.1~install: tar@1.0.1
npm info lifecycle tar@1.0.1~postinstall: tar@1.0.1
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp/node_modules/tar-pack
npm info lifecycle tar-pack@2.0.0~preinstall: tar-pack@2.0.0
npm info linkStuff tar-pack@2.0.0
npm info lifecycle tar-pack@2.0.0~install: tar-pack@2.0.0
npm info lifecycle tar-pack@2.0.0~postinstall: tar-pack@2.0.0
npm info linkStuff opencv@3.2.0
npm info build /app/node_modules/opencv/node_modules/node-pre-gyp
npm info lifecycle node-pre-gyp@0.5.31~preinstall: node-pre-gyp@0.5.31
npm info linkStuff node-pre-gyp@0.5.31
npm info lifecycle node-pre-gyp@0.5.31~install: node-pre-gyp@0.5.31
npm info lifecycle node-pre-gyp@0.5.31~postinstall: node-pre-gyp@0.5.31
npm info lifecycle buffers@0.1.1~install: buffers@0.1.1
npm info lifecycle nan@1.9.0~install: nan@1.9.0
npm info lifecycle node-pre-gyp@0.6.15~install: node-pre-gyp@0.6.15
npm info lifecycle opencv@3.2.0~install: opencv@3.2.0
> opencv@3.2.0 install /app/node_modules/opencv
> node-pre-gyp install --fallback-to-build
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.5.31
node-pre-gyp info using node@5.0.0 | linux | x64
node-pre-gyp info check checked for "/app/node_modules/opencv/build/opencv/v3.2.0/Release/node-v47-linux-x64/opencv.node" (not found)
node-pre-gyp http GET https://node-opencv.s3.amazonaws.com/opencv/v3.2.0/Release/node-v47-linux-x64.tar.gz
node-pre-gyp http 403 https://node-opencv.s3.amazonaws.com/opencv/v3.2.0/Release/node-v47-linux-x64.tar.gz
node-pre-gyp http 403 status code downloading tarball (falling back to source compile with node-gyp)
(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
gyp info it worked if it ends with ok
gyp info using node-gyp@3.0.3
gyp info using node@5.0.0 | linux | x64
gyp http GET https://nodejs.org/download/release/v5.0.0/node-v5.0.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v5.0.0/node-v5.0.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v5.0.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v5.0.0/SHASUMS256.txt
gyp info spawn python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/app/node_modules/opencv/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.node-gyp/5.0.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/5.0.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/app/node_modules/opencv',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/app/node_modules/opencv/build'
CXX(target) Release/obj.target/opencv/src/init.o
In file included from ../src/OpenCV.h:12:0,
from ../src/init.cc:1:
../../nan/nan.h:324:27: error: redefinition of 'template<class T> v8::Local<T> Nan::imp::NanEnsureHandleOrPersistent(const v8::Local<T>&)'
NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
^
../../nan/nan.h:319:17: note: 'template<class T> v8::Handle<T> Nan::imp::NanEnsureHandleOrPersistent(v8::Handle<T>&)' previously declared here
v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
^
../../nan/nan.h:344:27: error: redefinition of 'template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(v8::Handle<T>&)'
NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
^
../../nan/nan.h:334:27: note: 'template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(const v8::Local<T>&)' previously declared here
NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
^
../../nan/nan.h:757:13: error: 'node::smalloc' has not been declared
, node::smalloc::FreeCallback callback
^
../../nan/nan.h:757:35: error: expected ',' or '...' before 'callback'
, node::smalloc::FreeCallback callback
^
../../nan/nan.h: In function 'v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)':
../../nan/nan.h:761:50: error: 'callback' was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h:761:60: error: 'hint' was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h: In function 'v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)':
../../nan/nan.h:768:67: error: call of overloaded 'New(v8::Isolate*, const char*&, uint32_t&)' is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../../nan/nan.h:768:67: note: candidates are:
In file included from ../src/OpenCV.h:8:0,
from ../src/init.cc:1:
/root/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/root/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from 'uint32_t {aka unsigned int}' to 'node::encoding'
/root/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/root/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from 'const char*' to 'char*'
In file included from ../src/OpenCV.h:12:0,
from ../src/init.cc:1:
../../nan/nan.h: In function 'v8::Local<v8::Object> NanNewBufferHandle(uint32_t)':
../../nan/nan.h:772:61: error: could not convert 'node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))' from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../../nan/nan.h: In function 'v8::Local<v8::Object> NanBufferUse(char*, uint32_t)':
../../nan/nan.h:779:12: error: 'Use' is not a member of 'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
In file included from ../src/init.cc:5:0:
../src/CascadeClassifierWrap.h: At global scope:
../src/CascadeClassifierWrap.h:5:7: error: 'CascadeClassifier' in namespace 'cv' does not name a type
cv::CascadeClassifier cc;
^
In file included from ../src/init.cc:6:0:
../src/VideoCaptureWrap.h:5:11: error: 'VideoCapture' in namespace 'cv' does not name a type
cv::VideoCapture cap;
^
In file included from ../src/init.cc:15:0:
../src/Stereo.h:8:9: error: 'StereoBM' in namespace 'cv' does not name a type
cv::StereoBM stereo;
^
../src/Stereo.h:14:31: error: 'cv::StereoBM' has not been declared
StereoBM(int preset = cv::StereoBM::BASIC_PRESET, int ndisparities = 0, int SADWindowSize=21);
^
../src/Stereo.h:21:9: error: 'StereoSGBM' in namespace 'cv' does not name a type
cv::StereoSGBM stereo;
^
opencv.target.mk:111: recipe for target 'Release/obj.target/opencv/src/init.o' failed
make: *** [Release/obj.target/opencv/src/init.o] Error 1
make: Leaving directory '/app/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:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.12-boot2docker
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.2.0" "--major=3" "--minor=2" "--runtime=node" "--node_abi=node-v47" "--platform=linux" "--target_platform=linux" "--arch=x64" "--target_arch=x64" "--module_main=./lib/opencv" "--host=https://node-opencv.s3.amazonaws.com/" "--module_path=/app/node_modules/opencv/build/opencv/v3.2.0/Release/node-v47-linux-x64" "--module=/app/node_modules/opencv/build/opencv/v3.2.0/Release/node-v47-linux-x64/opencv.node" "--remote_path=./opencv/v3.2.0/Release/" "--package_name=node-v47-linux-x64.tar.gz" "--staged_tarball=build/stage/opencv/v3.2.0/Release/node-v47-linux-x64.tar.gz" "--hosted_path=https://node-opencv.s3.amazonaws.com/opencv/v3.2.0/Release/" "--hosted_tarball=https://node-opencv.s3.amazonaws.com/opencv/v3.2.0/Release/node-v47-linux-x64.tar.gz"
gyp ERR! cwd /app/node_modules/opencv
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
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.2.0 --major=3 --minor=2 --runtime=node --node_abi=node-v47 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/opencv --host=https://node-opencv.s3.amazonaws.com/ --module_path=/app/node_modules/opencv/build/opencv/v3.2.0/Release/node-v47-linux-x64 --module=/app/node_modules/opencv/build/opencv/v3.2.0/Release/node-v47-linux-x64/opencv.node --remote_path=./opencv/v3.2.0/Release/ --package_name=node-v47-linux-x64.tar.gz --staged_tarball=build/stage/opencv/v3.2.0/Release/node-v47-linux-x64.tar.gz --hosted_path=https://node-opencv.s3.amazonaws.com/opencv/v3.2.0/Release/ --hosted_tarball=https://node-opencv.s3.amazonaws.com/opencv/v3.2.0/Release/node-v47-linux-x64.tar.gz' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/app/node_modules/opencv/node_modules/node-pre-gyp/lib/util/compile.js:76:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:818:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 4.1.12-boot2docker
node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/opencv/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /app/node_modules/opencv
node-pre-gyp ERR! node -v v5.0.0
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.2.0 --major=3 --minor=2 --runtime=node --node_abi=node-v47 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/opencv --host=https://node-opencv.s3.amazonaws.com/ --module_path=/app/node_modules/opencv/build/opencv/v3.2.0/Release/node-v47-linux-x64 --module=/app/node_modules/opencv/build/opencv/v3.2.0/Release/node-v47-linux-x64/opencv.node --remote_path=./opencv/v3.2.0/Release/ --package_name=node-v47-linux-x64.tar.gz --staged_tarball=build/stage/opencv/v3.2.0/Release/node-v47-linux-x64.tar.gz --hosted_path=https://node-opencv.s3.amazonaws.com/opencv/v3.2.0/Release/ --hosted_tarball=https://node-opencv.s3.amazonaws.com/opencv/v3.2.0/Release/node-v47-linux-x64.tar.gz' (1)
npm info lifecycle opencv@3.2.0~install: Failed to exec install script
npm WARN EPACKAGEJSON open-parking@1.0.0 No description
npm WARN EPACKAGEJSON open-parking@1.0.0 No repository field.
npm ERR! Linux 4.1.12-boot2docker
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "opencv"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code ELIFECYCLE
npm ERR! opencv@3.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv@3.2.0 install script 'node-pre-gyp install --fallback-to-build'.
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! Please include the following file with any support request:
npm ERR! /app/npm-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment