opencv4nodejs icon indicating copy to clipboard operation
opencv4nodejs copied to clipboard

Install failing at 55% MacOS Monterey

Open Pranushan157 opened this issue 3 years ago • 2 comments
trafficstars

Error Message

[ 55%] Linking CXX shared library ../../lib/libopencv_core.dylib [ 55%] Built target opencv_core make: *** [all] Error 2 ERR! child process exited with code 2 (for more info, set '--loglevel silly') npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node ./install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/pranushannimalan/.npm/_logs/2022-10-13T15_37_03_754Z-debug.log

Auto Build - Full Error Log

error.txt

Manual Build - Environment Information

OpenCV version (example 3.4.1): 3.4.6

With OpenCV-contrib? (extra modules): no

OS: MacOS Monterey

Pranushan157 avatar Oct 13 '22 15:10 Pranushan157

opencv-build seems not working well with macOS (on M1-powered mac it fails on library not found for -lfreetype even if freetype is installed), so my solution was to install OpenCV manually (via Brew) and point opencv4nodejs to it (opencv-build should be removed):

"opencv4nodejs": {
    "opencvLibDir": "/opt/homebrew/Cellar/opencv/4.6.0_1/lib",
    "opencvBinDir": "/opt/homebrew/Cellar/opencv/4.6.0_1/bin",
    "opencvIncludeDir": "/opt/homebrew/Cellar/opencv/4.6.0_1/bin",
    "disableAutoBuild": true
},

dmakeev avatar Oct 17 '22 13:10 dmakeev

This repository is not maintained anymore, please use @u4/opencv4nodejs for a more active fork

piercus avatar Nov 08 '22 11:11 piercus