MacOS 14.4.1: 'brew install opencv' ends up in directory /opt/homebrew/Cellar/opencv/4.9.0_8.reinstall? #5369
Unanswered
scomx
asked this question in
Everyday usage
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Output of
brew config
Output of
brew doctor
Description of issue
When running
brew install opencv
it ends up installed in directory/opt/homebrew/Cellar/opencv/4.9.0_8.reinstall
Consequently I get linker errors as it appears that the .reinstall suffix is ignored in any linker flags, specifically this was the case for a golang GOCV example program with CGO_LDFLAGS set:
export CGO_LDFLAGS="-L/opt/homebrew/Cellar/opencv/4.9.0_8.reinstall/lib -lopencv_stitching -lopencv_superres [+ all other libs]
Linker error: (note no .reinstall suffix in path)
Linker error dyld[32984]: Library not loaded: @rpath/libopencv_xfeatures2d.409.dylib ... Reason: tried: '/opt/homebrew/Cellar/opencv/4.9.0_8/lib/libopencv_xfeatures2d.409.dylib' (no such file)
A secondary problem is that pkg-config paths end up being incorrect .
Tried brew link, brew update with no difference. In the end I made a temp hack by adding a symlink
4.9.0_8 ⇒ /opt/homebrew/Cellar/opencv/4.9.0_8.reinstall
in/opt/homebrew/Cellar/opencv/
but this doesn't seem right.Can anyone help me understand what is going on here?
Beta Was this translation helpful? Give feedback.
All reactions