question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation fails on macOS Sierra

See original GitHub issue
npm install smartcrop-cli --save-dev
/project/node_modules/opencv/utils/find-opencv.js:21
                throw new Error("ERROR: failed to run: pkg-config", opencv, flag);
                ^

Error: ERROR: failed to run: pkg-config
    at /project/node_modules/opencv/utils/find-opencv.js:21:23
    at ChildProcess.exithandler (child_process.js:213:5)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)
gyp: Call to 'node utils/find-opencv.js --cflags' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
Failed to execute 'node-gyp configure --fallback-to-build --module=/project/node_modules/opencv/build/opencv/v5.0.0/Release/node-v48-darwin-x64/opencv.node --module_name=opencv --module_path=/project/node_modules/opencv/build/opencv/v5.0.0/Release/node-v48-darwin-x64 --python=python2.7' (1)
/project
└── smartcrop-cli@1.0.2

I just installed OpenCV3 using:

$ brew tap homebrew/science && brew install --HEAD opencv3

At a minimum, it might be cool to have a note in README about how to get opencv installed and that it is a hard dependency (as this CLI would not install without opencv … though, I obviously can’t install with it either!).

Thanks for listening!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rmamminacommented, Feb 16, 2017

Running

brew install homebrew/science/opencv

worked for me.

0reactions
mhulsecommented, Feb 16, 2017

brew install homebrew/science/opencv

I need to try that again actually. I recently followed this:

http://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/

But realized opencv3 is not exactly opencv

Looking like this is just boiling down to user inexperience. 😆

Closing, and thanks for the help @rmammina and all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

macOS Sierra Installation issue! - Apple Support Communities
I have received this message "An error occurred while preparing the installation. Try running this application again.
Read more >
macOS Sierra problems: Here's how to fix the most common ...
macOS Sierra problems : Here's how to fix the most common issues · 1. Shut down the device · 2. Plug in the...
Read more >
How to Fix the "macOS Could Not Be Installed on Your ...
1. Restart Your Mac and Retry the Installation · 2. Set Your Mac to the Correct Date and Time · 3. Create Enough...
Read more >
How to Fix 'macOS Could Not Be Installed on Your Computer ...
How to Fix the 'macOS Could Not Be Installed' Error · Restart and try the installation again. · Check the Date & Time...
Read more >
Fix macOS High Sierra Update Failure/Stuck/Installation Error
Fix 2. macOS 10.13/10.13.4 High Sierra fails to install/gets stuck or freezes while installing · Disable or uninstall any anti-virus software on ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found