I've been having a go at this issue the whole evening on my mac terminal window. I'm having difficulty installing optipng with 'brew install optipng' on my mac.
Here is a log from terminal after 'brew install optipng'
==> Downloading https://downloads.sourceforge.net/project/optipng/OptiPNG/optipn
Already downloaded: /Library/Caches/Homebrew/optipng-0.7.5.tar.gz
==> ./configure --with-system-zlib --prefix=/usr/local/Cellar/optipng/0.7.5 --ma
==> make install
_main in optipng.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [optipng] Error 1
make: *** [install] Error 2
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
Naturally, I followed the link to github, and tried getting somewhere with brew doctor, instructions suggested by brew doctor, and even brew update.
I will include some of the warnings from brew doctor here, and will follow up with the whole log if need be (I don't want to clog up the post with unnecessary info).
Warning: gettext files detected at a system prefix
These files can cause compilation and link failures, especially if they
are compiled with improper architectures. Consider removing these files:
/usr/local/lib/libintl.dylib
Warning: Your XQuartz (2.7.4) is outdated
Please install XQuartz 2.7.5:
https://xquartz.macosforge.org
Warning: Python is installed at /Library/Frameworks/Python.framework
Warning: You have MacPorts or Fink installed:
/opt/local/bin/port
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Any help would greatly be appreciated.
Thanks
This one was really frustrating for me, but I managed to resolve the homebrew doctor issues, heres how:
Warning: Python is installed at /Library/Frameworks/Python.framework
I had multiple versions of Python installed, so I went ahead and deleted this one with:
sudo rm -rf /Library/Frameworks/Python.framework
Warning: You have MacPorts or Fink installed:
This one was a lot more difficult, my Macports had a PATH issues, so I had to add the path where it was located with terminal, then delete it from there.
Warning: Unbrewed dylibs were found in /usr/local/lib.
I deleted these with rm on terminal.
Warning: Unbrewed .la files were found in /usr/local/lib.
Deleted.
Unbrewed static libraries were found in /usr/local/lib.
If i'm not mistaken, I did brew prune here.
There was also changing the permissions in all my PATH files from root to me.
After doing this optipng installed fine.
Related
I'm trying to follow these instructions to compile Elmer FEM on macOS Mojave Version 10.14.6. However, when running the make install I get the error message:
.../elmerfem/umfpack/src/umfpack/include/umf_internal.h:29:10: fatal error: 'string.h' file not found
#include <string.h>
^~~~~~~~~~
1 error generated.
make[2]: *** [umfpack/src/umfpack/umfpack_zl_save_symbolic.c] Error 1
make[2]: *** Deleting file `umfpack/src/umfpack/umfpack_zl_save_symbolic.c'
make[1]: *** [umfpack/src/umfpack/CMakeFiles/umfpack.dir/all] Error 2
make: *** [all] Error 2
searching the internet this post suggests
xcode-select --install
sudo xcode-select --switch /Library/Developer/CommandLineTools/
which had already been done before in my case and have no effect on the above error. This and this post suggest
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / -allowUntrusted
which leads to the error message
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
I would appreciate it if you could help me know what is the problem and how I can resolve it. Thanks for your kind support in advance.
P.S.1. As was asked here, my make version is GNU Make 3.81.
P.S.2. the list of string.h files on my hard drive here.
P.S.3. the output of CMake is pasted here.
OK, I think I solved the problem. From here, I ran
cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ ..
while being inside the build folder. and then make . worked fine except some warning. I'm still not sure what was the problem or if this is the optimal/canonical solution. So I will not mark this as the accepted solution until others provide better ones.
P.S.1. I sent a pull request here on Elmer's HomeBrew formula as well.
P.S.2. To compile with OpenMP and MPI:
cmake -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9 -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/9.2.0_3/bin/g++-9 -DWITH_Mumps=FALSE -DWITH_MPI=TRUE -DWITH_OpenMP=TRUE -DWITH_MKL=FALSE -DWITH_ELMERGUI=TRUE -DWITH_ELMERPOST=FALSE -DWITH_ELMERGUITESTER=FALSE ..
I have GNU GCC and OpenMPI installed via HomeBrew brew install gcc open-mpi.
P.S.3. If you want the ElmerGUI also installed:
install qt4 with brew install cartr/qt4/qt#4 from here
install qwt with brew install cartr/qt4/qwt-qt4
then cmake -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9 -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/9.2.0_3/bin/g++-9 -DWITH_Mumps=FALSE -DWITH_MPI=TRUE -DWITH_OpenMP=TRUE -DWITH_MKL=FALSE -DWITH_ELMERGUI=TRUE -DWITH_ELMERPOST=TRUE -DWITH_ELMERGUITESTER=TRUE -DQWT_INCLUDE_DIR=/usr/local/Cellar/qwt-qt4/6.1.3_1/lib/qwt.framework/Versions/6/Headers/ ..
My configuration is a little messed up. I am unable install rbenv:
$ brew install rbenv
Error: You must `brew link pkg-config` before rbenv can be installed
So I tried:
$ brew link autoconf pkg-config
Warning: Already linked: /usr/local/Cellar/autoconf/2.69
To relink: brew unlink autoconf && brew link autoconf
Linking /usr/local/Cellar/pkg-config/0.29.1_1...
Error: Could not symlink share/doc/pkg-config
/usr/local/share/doc is not writable.
I am running this version of brew, but I find this version listing odd:
$ brew -v
Homebrew 0.9.9 (git revision aaf8; last commit 2016-09-09)
Homebrew/homebrew-core (git revision 5d48; last commit 2016-09-09)
Also tried this to uninstall brew
$ -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)
-e:100:in `realpath': No such file or directory - /usr/local/.git (Errno::ENOENT)
from -e:100:in `realpath'
from -e:100:in `<main>'
Brew doctor says my brew install is fairly messed up:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: gettext files detected at a system prefix.
These files can cause compilation and link failures, especially if they
are compiled with improper architectures. Consider removing these files:
/usr/local/lib/libintl.dylib
/usr/local/lib/libintl.dylib
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libatk-1.0.0.2209.1.dylib
/usr/local/lib/libgdk-x11-2.0.0.1200.0.dylib
/usr/local/lib/libgdk_pixbuf-2.0.0.1200.0.dylib
/usr/local/lib/libgdk_pixbuf_xlib-2.0.0.1200.0.dylib
/usr/local/lib/libgio-2.0.0.0.0.dylib
/usr/local/lib/libGLEW.1.5.4.dylib
/usr/local/lib/libglib-2.0.0.1600.0.dylib
/usr/local/lib/libgmodule-2.0.0.1600.0.dylib
/usr/local/lib/libgobject-2.0.0.1600.0.dylib
/usr/local/lib/libgthread-2.0.0.1600.0.dylib
/usr/local/lib/libgtk-x11-2.0.0.1200.0.dylib
/usr/local/lib/libintl.8.0.2.dylib
/usr/local/lib/libjpeg.62.dylib
/usr/local/lib/libpango-1.0.0.2100.0.dylib
/usr/local/lib/libpangocairo-1.0.0.2100.0.dylib
/usr/local/lib/libpangoft2-1.0.0.2100.0.dylib
/usr/local/lib/libpangox-1.0.0.2100.0.dylib
/usr/local/lib/libpangoxft-1.0.0.2100.0.dylib
/usr/local/lib/libportaudio.2.0.0.dylib
/usr/local/lib/libSDL-1.2.0.dylib
/usr/local/lib/libz.1.2.5.dylib
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/node/android-ifaddrs.h
/usr/local/include/node/ares.h
/usr/local/include/node/ares_version.h
/usr/local/include/node/libplatform/libplatform.h
/usr/local/include/node/nameser.h
/usr/local/include/node/node.h
/usr/local/include/node/node_buffer.h
/usr/local/include/node/node_internals.h
/usr/local/include/node/node_object_wrap.h
/usr/local/include/node/node_version.h
/usr/local/include/node/openssl/aes.h
/usr/local/include/node/openssl/archs/aix-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/aix64-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/opensslconf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/opensslconf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h
/usr/local/include/node/openssl/archs/linux-aarch64/opensslconf.h
/usr/local/include/node/openssl/archs/linux-armv4/opensslconf.h
/usr/local/include/node/openssl/archs/linux-elf/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x32/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x86_64/opensslconf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN32/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/opensslconf.h
/usr/local/include/node/openssl/asn1.h
/usr/local/include/node/openssl/asn1_mac.h
/usr/local/include/node/openssl/asn1t.h
/usr/local/include/node/openssl/bio.h
/usr/local/include/node/openssl/blowfish.h
/usr/local/include/node/openssl/bn.h
/usr/local/include/node/openssl/buffer.h
/usr/local/include/node/openssl/camellia.h
/usr/local/include/node/openssl/cast.h
/usr/local/include/node/openssl/cmac.h
/usr/local/include/node/openssl/cms.h
/usr/local/include/node/openssl/comp.h
/usr/local/include/node/openssl/conf.h
/usr/local/include/node/openssl/conf_api.h
/usr/local/include/node/openssl/crypto.h
/usr/local/include/node/openssl/des.h
/usr/local/include/node/openssl/des_old.h
/usr/local/include/node/openssl/dh.h
/usr/local/include/node/openssl/dsa.h
/usr/local/include/node/openssl/dso.h
/usr/local/include/node/openssl/dtls1.h
/usr/local/include/node/openssl/e_os2.h
/usr/local/include/node/openssl/ebcdic.h
/usr/local/include/node/openssl/ec.h
/usr/local/include/node/openssl/ecdh.h
/usr/local/include/node/openssl/ecdsa.h
/usr/local/include/node/openssl/engine.h
/usr/local/include/node/openssl/err.h
/usr/local/include/node/openssl/evp.h
/usr/local/include/node/openssl/hmac.h
/usr/local/include/node/openssl/idea.h
/usr/local/include/node/openssl/krb5_asn.h
/usr/local/include/node/openssl/kssl.h
/usr/local/include/node/openssl/lhash.h
/usr/local/include/node/openssl/md4.h
/usr/local/include/node/openssl/md5.h
/usr/local/include/node/openssl/mdc2.h
/usr/local/include/node/openssl/modes.h
/usr/local/include/node/openssl/obj_mac.h
/usr/local/include/node/openssl/objects.h
/usr/local/include/node/openssl/ocsp.h
/usr/local/include/node/openssl/opensslconf.h
/usr/local/include/node/openssl/opensslv.h
/usr/local/include/node/openssl/ossl_typ.h
/usr/local/include/node/openssl/pem.h
/usr/local/include/node/openssl/pem2.h
/usr/local/include/node/openssl/pkcs12.h
/usr/local/include/node/openssl/pkcs7.h
/usr/local/include/node/openssl/pqueue.h
/usr/local/include/node/openssl/rand.h
/usr/local/include/node/openssl/rc2.h
/usr/local/include/node/openssl/rc4.h
/usr/local/include/node/openssl/ripemd.h
/usr/local/include/node/openssl/rsa.h
/usr/local/include/node/openssl/safestack.h
/usr/local/include/node/openssl/seed.h
/usr/local/include/node/openssl/sha.h
/usr/local/include/node/openssl/srp.h
/usr/local/include/node/openssl/srtp.h
/usr/local/include/node/openssl/ssl.h
/usr/local/include/node/openssl/ssl2.h
/usr/local/include/node/openssl/ssl23.h
/usr/local/include/node/openssl/ssl3.h
/usr/local/include/node/openssl/stack.h
/usr/local/include/node/openssl/symhacks.h
/usr/local/include/node/openssl/tls1.h
/usr/local/include/node/openssl/ts.h
/usr/local/include/node/openssl/txt_db.h
/usr/local/include/node/openssl/ui.h
/usr/local/include/node/openssl/ui_compat.h
/usr/local/include/node/openssl/whrlpool.h
/usr/local/include/node/openssl/x509.h
/usr/local/include/node/openssl/x509_vfy.h
/usr/local/include/node/openssl/x509v3.h
/usr/local/include/node/pthread-fixes.h
/usr/local/include/node/stdint-msvc2008.h
/usr/local/include/node/tree.h
/usr/local/include/node/uv-aix.h
/usr/local/include/node/uv-bsd.h
/usr/local/include/node/uv-darwin.h
/usr/local/include/node/uv-errno.h
/usr/local/include/node/uv-linux.h
/usr/local/include/node/uv-sunos.h
/usr/local/include/node/uv-threadpool.h
/usr/local/include/node/uv-unix.h
/usr/local/include/node/uv-version.h
/usr/local/include/node/uv-win.h
/usr/local/include/node/uv.h
/usr/local/include/node/v8-debug.h
/usr/local/include/node/v8-platform.h
/usr/local/include/node/v8-profiler.h
/usr/local/include/node/v8-testing.h
/usr/local/include/node/v8-util.h
/usr/local/include/node/v8-version.h
/usr/local/include/node/v8.h
/usr/local/include/node/v8config.h
/usr/local/include/node/zconf.h
/usr/local/include/node/zlib.h
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libatk-1.0.la
/usr/local/lib/libgdk-x11-2.0.la
/usr/local/lib/libgdk_pixbuf-2.0.la
/usr/local/lib/libgdk_pixbuf_xlib-2.0.la
/usr/local/lib/libgio-2.0.la
/usr/local/lib/libglib-2.0.la
/usr/local/lib/libgmodule-2.0.la
/usr/local/lib/libgobject-2.0.la
/usr/local/lib/libgthread-2.0.la
/usr/local/lib/libgtk-x11-2.0.la
/usr/local/lib/libintl.la
/usr/local/lib/libjpeg.la
/usr/local/lib/libpango-1.0.la
/usr/local/lib/libpangocairo-1.0.la
/usr/local/lib/libpangoft2-1.0.la
/usr/local/lib/libpangox-1.0.la
/usr/local/lib/libpangoxft-1.0.la
/usr/local/lib/libportaudio.la
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected static libraries:
/usr/local/lib/libGLEW.a
/usr/local/lib/libintl.a
/usr/local/lib/libjpeg.a
/usr/local/lib/libportaudio.a
/usr/local/lib/libz.a
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
autoconf
libgpg-error
libtool
pkg-config
FIXED:
Removing all of the files listed under Unexpected Dylibs allows running brew install rbenv to work.
I'm using Homebrew rbenv. brew doctor comes out fine. rbenv install 2.0.0-p451 gives the following error message:
user$ rbenv install 2.0.0-p451
Downloading ruby-2.0.0-p451.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/9227787a9636551f1749ee8394b5ffe5
Installing ruby-2.0.0-p451...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501101240.6245
Results logged to /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501101240.6245.log
Last 10 log lines:
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
installing default openssl libraries
1 warning generated.
linking shared-object date_core.bundle
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
linking shared-object openssl.bundle
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
linking shared-object ripper.bundle
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
make: *** [build-ext] Error 2
I tried googling it but not luck. Any tips?
p.s. I tried other ruby versions but same issue (although the last 10 lines of the log are slightly different).
Edit: installing version 1.9.3-p545 works fine.
brew cleanup and remove this /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501101240.6245 file.
I remember i removed all /var/folders/4h folder (wasn't exactly such name, but then i removed all folders in /var/folders/ and there wasn't no problem).
I ran the brew doctor command after brew not working so I followed the steps and I tried chowning all of the errors and delete them, but would not work no matter what I did.
Coles-MacBook-Pro:~ coleschiffer$ brew doctor
Warning: /Users/coleschiffer/Library/Logs/Homebrew isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew.
Homebrew writes debugging logs to this location.
You should probably `chown` /Users/coleschiffer/Library/Logs/Homebrew
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libntfs-3g.80.dylib
/usr/local/lib/libntfs.9.0.0.dylib
/usr/local/lib/libublio.1.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libntfs-3g.la
/usr/local/lib/libntfs.la
/usr/local/lib/libublio.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/libntfs-3g.pc
/usr/local/lib/pkgconfig/libublio.pc
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected static libraries:
/usr/local/lib/libntfs-3g.a
/usr/local/lib/libntfs.a
/usr/local/lib/libublio.a
Coles-MacBook-Pro:~ coleschiffer$
Thanks a lot for you taking your time to help and/or read this.
I have mac, os x 10.8.3
I used to have macports installed, I deleted it and trying to install opencv using Homebrew.
I installed lame, ffmpeg. Changed $PATH. The error is still the same:
Nellys-MacBook-Pro:~ nellysmitt$ brew install opencv
==> Downloading http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/
Already downloaded: /Library/Caches/Homebrew/opencv-2.4.5.tar.gz
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/opencv/2.4.5 -DCMAKE_BUILD_TY
==> make
[ 38%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_tiff.cpp.o
Linking CXX shared library ../../lib/libopencv_video.dylib
[ 38%] Built target opencv_video
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
Brew doctor was ok before installing ffmpeg. NOw it tells:
Nellys-MacBook-Pro:~ nellysmitt$ brew doctor
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libavcodec.52.108.0.dylib
/usr/local/lib/libavcore.0.16.1.dylib
/usr/local/lib/libavdevice.52.2.3.dylib
/usr/local/lib/libavfilter.1.74.0.dylib
/usr/local/lib/libavformat.52.93.0.dylib
/usr/local/lib/libavutil.50.36.0.dylib
/usr/local/lib/libmp3lame.0.dylib
/usr/local/lib/libswscale.0.12.0.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libmp3lame.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/libavcodec.pc
/usr/local/lib/pkgconfig/libavcore.pc
/usr/local/lib/pkgconfig/libavdevice.pc
/usr/local/lib/pkgconfig/libavfilter.pc
/usr/local/lib/pkgconfig/libavformat.pc
/usr/local/lib/pkgconfig/libavutil.pc
/usr/local/lib/pkgconfig/libswscale.pc
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected static libraries:
/usr/local/lib/libavcodec.a
/usr/local/lib/libavcore.a
/usr/local/lib/libavdevice.a
/usr/local/lib/libavfilter.a
/usr/local/lib/libavformat.a
/usr/local/lib/libavutil.a
/usr/local/lib/libmp3lame.a
/usr/local/lib/libswscale.a
But the ERROR is the SAME for the last 24 hours. I'm mad and desperate. Don't know how to install this damn OpenCV.
This worked for me Oct 2013:
first brew update to be sure homebrew is current
then brew doctor and be sure homebrew reports no issues
Then, brew tap homebrew/science to point to latest opencv
Then brew install opencv
Best of luck!