opencv4nodejs icon indicating copy to clipboard operation
opencv4nodejs copied to clipboard

can't install in pi4

Open o0mrs opened this issue 2 years ago • 1 comments

Error Message

lukes@lukes:~/firee $ npm init This utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess sensible defaults.

See npm help init for definitive documentation on these fields and exactly what they do.

Use npm install <pkg> afterwards to install a package and save it as a dependency in the package.json file.

Press ^C at any time to quit. package name: (firee) version: (1.0.0) description: entry point: (index.js) test command: git repository: keywords: author: license: (ISC) About to write to /home/lukes/firee/package.json:

{ "name": "firee", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "", "license": "ISC" }

Is this OK? (yes) lukes@lukes:~/firee $ export OPENCV4NODEJS_DISABLE_AUTOBUILD=1 lukes@lukes:~/firee $ time npm install @u4/opencv4nodejs --loglevel verbose npm verb cli /usr/bin/node /usr/bin/npm npm info using [email protected] npm info using [email protected] npm verb title npm install @u4/opencv4nodejs npm verb argv "install" "@u4/opencv4nodejs" "--loglevel" "verbose" npm verb logfile logs-max:10 dir:/home/lukes/.npm/_logs/2023-02-01T21_47_08_054Z- npm verb logfile /home/lukes/.npm/_logs/2023-02-01T21_47_08_054Z-debug-0.log npm http fetch GET 200 https://registry.npmjs.org/@u4%2fopencv4nodejs 71ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/@u4%2ftiny-glob 68ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/native-node-utils 70ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/@u4%2fopencv-build 85ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/npmlog 80ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/node-gyp 87ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/picocolors 91ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/nan 103ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/env-paths 131ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/rimraf 142ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/graceful-fs 141ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/which 130ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/are-we-there-yet 131ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/console-control-strings 132ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/tar 144ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/set-blocking 137ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/glob 171ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/gauge 155ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/nopt 181ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/semver 182ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/make-fetch-happen 196ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/minimatch 333ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/fs.realpath 355ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/once 344ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/inherits 354ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/http-cache-semantics 337ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/http-proxy-agent 339ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/https-proxy-agent 341ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/lru-cache 338ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/minipass 343ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/minipass-collect 350ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/minipass-flush 336ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/minipass-pipeline 336ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/minipass-fetch 362ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/negotiator 359ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/path-is-absolute 420ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/socks-proxy-agent 366ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/agentkeepalive 425ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/promise-retry 377ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/abbrev 372ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/ssri 378ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/lru-cache 379ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/chownr 385ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/fs-minipass 386ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/inflight 479ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/minipass 392ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/mkdirp 390ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/is-lambda 458ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/minizlib 401ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/cacache 479ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/yallist 415ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/isexe 415ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/wrappy 24ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/brace-expansion 23ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/depd 205ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/debug 213ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/humanize-ms 211ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/@npmcli%2ffs 211ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/infer-owner 206ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/@npmcli%2fmove-file 214ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/@tootallnate%2fonce 202ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/p-map 212ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/agent-base 201ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/promise-inflight 217ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/unique-filename 217ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/debug 208ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/minipass-sized 206ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/encoding 205ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/agent-base 198ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/err-code 207ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/socks 200ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/retry 215ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/debug 214ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/ms 26ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/ms 27ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/@gar%2fpromisify 47ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/unique-slug 43ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/aggregate-error 49ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/balanced-match 21ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/concat-map 20ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/iconv-lite 12ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/safer-buffer 8ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/aproba 81ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/readable-stream 88ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/has-unicode 86ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/signal-exit 86ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/strip-ansi 74ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/color-support 99ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/delegates 110ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/wide-align 79ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/string-width 88ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/buffer 54ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/events 56ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/abort-controller 66ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/process 59ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/emoji-regex 28ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point 30ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 30ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/clean-stack 20ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/indent-string 22ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/ieee754 72ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/event-target-shim 81ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/base64-js 84ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/ip 20ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/smart-buffer 21ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/imurmurhash 11ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/string_decoder 19ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/util-deprecate 19ms (cache hit) npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 8ms (cache hit) npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 1949ms npm info run @u4/[email protected] install node_modules/@u4/opencv4nodejs node bin/install.js auto npm info run @u4/[email protected] install { code: 1, signal: null } npm verb stack Error: command failed npm verb stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27) npm verb stack at ChildProcess.emit (node:events:513:28) npm verb stack at maybeClose (node:internal/child_process:1091:16) npm verb stack at ChildProcess._handle.onexit (node:internal/child_process:302:5) npm verb pkgid @u4/[email protected] npm verb cwd /home/lukes/firee npm verb Linux 5.15.84-v7l+ npm verb node v18.13.0 npm verb npm v9.4.0 npm ERR! code 1 npm ERR! path /home/lukes/firee/node_modules/@u4/opencv4nodejs npm ERR! command failed npm ERR! command sh -c node bin/install.js auto npm ERR! info config no opencv4nodejs section found in /home/lukes/firee/node_modules/@u4/opencv4nodejs/package.json npm ERR! info envAutodetect autodetect 0 changes npm ERR! info envAutodetect - failed to resolve OPENCV_LIB_DIR from /usr/lib/*-linux-gnu npm ERR! info install Using openCV 0.0.0 npm ERR! info install OPENCV_LIB_DIR is not set, looking for default lib dir npm ERR! info install Using lib dir: /usr/local/lib npm ERR! info install OPENCV4NODEJS_DISABLE_AUTOBUILD is set skipping auto build... npm ERR! /home/lukes/firee/node_modules/@u4/opencv-build/dist/cjs/OpenCVBuildEnv.js:467 npm ERR! throw new Error(${varname} must be define if auto-build is disabled, and autodetection failed); npm ERR! ^ npm ERR! npm ERR! Error: OPENCV_LIB_DIR must be define if auto-build is disabled, and autodetection failed npm ERR! at OpenCVBuildEnv.getReady (/home/lukes/firee/node_modules/@u4/opencv-build/dist/cjs/OpenCVBuildEnv.js:467:27) npm ERR! at get opencvLibDir [as opencvLibDir] (/home/lukes/firee/node_modules/@u4/opencv-build/dist/cjs/OpenCVBuildEnv.js:687:14) npm ERR! at getLibsFactory.getLibs (/home/lukes/firee/node_modules/@u4/opencv-build/dist/cjs/getLibsFactory.js:81:41) npm ERR! at SetupOpencv.writeAutoBuildFile (/home/lukes/firee/node_modules/@u4/opencv-build/dist/cjs/setupOpencv.js:106:43) npm ERR! at OpenCVBuilder.install (/home/lukes/firee/node_modules/@u4/opencv-build/dist/cjs/OpenCVBuilder.js:86:19) npm ERR! at Object.compileLib (/home/lukes/firee/node_modules/@u4/opencv4nodejs/install/compileLib.js:241:19) npm ERR! at Object. (/home/lukes/firee/node_modules/@u4/opencv4nodejs/bin/install.js:3:12) npm ERR! at Module._compile (node:internal/modules/cjs/loader:1218:14) npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) npm ERR! at Module.load (node:internal/modules/cjs/loader:1081:32) npm ERR! npm ERR! Node.js v18.13.0 npm verb exit 1 npm verb unfinished npm timer reify 1675288028199 npm verb unfinished npm timer reify:build 1675288033734 npm verb unfinished npm timer build 1675288033735 npm verb unfinished npm timer build:deps 1675288033737 npm verb unfinished npm timer build:run:install 1675288033769 npm verb unfinished npm timer build:run:install:node_modules/@u4/opencv4nodejs 1675288033771 npm verb code 1

npm ERR! A complete log of this run can be found in: npm ERR! /home/lukes/.npm/_logs/2023-02-01T21_47_08_054Z-debug-0.log

real 0m8.193s user 0m8.626s sys 0m1.730s

Auto Build - Full Error Log

Manual Build - Environment Information

OpenCV version (example 3.4.1): ?.?.? didn't get to that part

With OpenCV-contrib? (extra modules): yes/no? no

OS: Windows 7 / 8 / 10? / MacOSX? / Ubuntu? ...pi4

o0mrs avatar Feb 01 '23 21:02 o0mrs

OPENCV_LIB_DIR must be define if auto-build is disabled,

OPENCV4NODEJS_DISABLE_AUTOBUILD is still enabled.

UrielCh avatar Feb 03 '23 06:02 UrielCh