I'm trying to install opencv by brew ,
but showed me the following errors.
I knew i should tap "brew tap homebrew/homebrew-science"
but it didn't work.
is there any idea , or should i show what information by what command to fix the problem quickly.
thanks~
[local] $ brew update
Error: Permission denied - /var/folders/wt/ffjhmkgx4292wtm22b966mdc0000gn/T/.gitignore20130904-819-fdlv65-0 or /usr/local/Library/Formula/.gitignore
[local] $ sudo brew update
Already up-to-date.
[local] $ sudo brew install opencv
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
Error: No available formula for opencv
[local] $ brew tap homebrew/homebrew-science
Error: Already tapped!
[local] $ sudo brew tap homebrew/homebrew-science
Error: Already tapped!
[local] $ sudo brew install opencv
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
Error: No available formula for opencv
[local] $ brew install opencv
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
Error: No available formula for opencv
if I tried to make manually by the tutorial http://tilomitra.com/opencv-on-mac-osx/
I will see the error after make -j8
_ff_xvid_rate_control_uninit in libavcodec.a(libxvid_rc.o)
"_xvid_plugin_lumimasking", referenced from:
_xvid_encode_init in libavcodec.a(libxvid.o)
"_xvid_plugin_single", referenced from:
_xvid_encode_init in libavcodec.a(libxvid.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[2]: *** [lib/libopencv_highgui.2.4.6.dylib] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
I have recently encountered a similar problem building OpenCV using brew. The central issue was that OpenCV would not build properly when building against ffmpeg (it will try to do this if ffmpeg is also installed.)
As suggested here, the problem can be resolved by using the following brew command to build OpenCV, which forces an alternative version of the build environment (one of the top troubleshooting suggestions for brew):
brew install opencv --env=std
Hope this works for you too!
Related
Been getting an error everytime I try to run 'rails server'
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
Don't forget to include the above Crash Report log file.
For details: http://www.ruby-lang.org/bugreport.html
Abort trap: 6
I have tried following the other tips such as bundle install and update but still same problem. Tried to rvm install 1.9.3 and got:
Checking requirements for osx.
Installing requirements for osx.
Updating system.....
Installing required packages: gcc49.......
Error running 'requirements_osx_brew_libs_install gcc49',
showing last 15 lines of /Users/Quoc/.rvm/log/1457707600_ruby-1.9.3-p551/package_install_gcc49.log
++ case "$1" in
++ [[ -t 1 ]]
++ return 1
++ printf %b 'There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
++ case "$_system_version" in
++ return 1
Requirements installation failed with status: 1.
Brew repair didnt work either.
EDIT: result from running brew install gcc46 --env=std
==> make bootstrap
Last 15 lines from /Users/Quoc/Library/Logs/Homebrew/gcc46/02.make:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_inflateEnd", referenced from:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_inflateInit_", referenced from:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_zError", referenced from:
_lto_end_compression in libbackend.a(lto-compress.o)
_lto_end_uncompression in libbackend.a(lto-compress.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[3]: *** [cc1] Error 1
rm gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
You have to install these dependences manually, try
brew install automake
if it gives you error of missing link of automake something like this
You must brew link autoconf before automake can be installed
then try these commands
brew link --overwrite --dry-run autoconf
brew link --overwrite autoconf
brew install automake
it will install automake and then you can try again to install ruby.
If it doesn't work you can try another thing:
Sol2:
brew install gcc46 --env=std
brew install gcc; brew install gcc46 --cc=gcc-4.9
Manually build GCC 4.6 outside of Homebrew, using the same configure switches
Also you can try with this :
$ brew install gcc
$ CC=/usr/local/bin/gcc-4.9 rvm install 1.9.1-p376 --enable-shared
I am trying to install the capybara-webkit gem and get the following error in OSX 10.9.4:
➜ hours git:(development) gem install capybara-webkit -v '1.2.0'
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
/Users/macbook/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
Command 'qmake -spec macx-g++ ' not available
Makefile not found
Gem files will remain installed in /Users/macbook/.rvm/gems/ruby-2.1.2/gems/capybara-webkit-1.2.0 for inspection.
Results logged to /Users/macbook/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/capybara-webkit-1.2.0/gem_make.out
So, researching that problem it seems like the solution is to run "brew install qt". When I run that I get the following:
➜ hours git:(development) brew install qt
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
==> Downloading http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-open
curl: (22) The requested URL returned error: 404 Not Found
Error: Download failed: http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz
I have checked and cannot find MacPorts or Fink anywhere on my Imac.
What am I missing here?
Homebrew has carried qt 4.8.6 since April. Please brew update && brew upgrade and try brew install qt again.
I recently update my OSX version to 10.9.2. The ruby-audio gem is failing with the following warnings and errors. What can I do so that libFLAC.8.dylib can be found?
gem install ruby-audio -v '1.6.1'
31 warnings generated.
compiling ra_soundinfo.c
compiling rubyaudio_ext.c
linking shared-object rubyaudio_ext.bundle
ld: file not found: /usr/local/lib/libFLAC.8.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [rubyaudio_ext.bundle] Error 1
It turned out that flac and libogg were previously installed by brew but the links were lost in usr/local/lib due to OS update so I had to reinstall it. I did the following and ruby-audio was installed successfully.
brew remove flac
brew install flac
brew remove libogg
brew install libogg
I had brewed version of python 2.7.6 installed on OS X mavericks and now am trying to install gdb with --with-brewed-python option.
But I am getting the following error message. Why it is checking python in /usr/local instead of /usr/local/bin? I think this is why it is failing. Anyone has any idea?
brew install gdb --with-brewed-python
==> Downloading http://ftpmirror.gnu.org/gdb/gdb-7.6.2.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/gdb/7.6.2 --with-system-readline --with-python=/usr/local
==> make
checking whether to use python... /usr/local
checking for python2.7... no
configure: error: no usable python found at /usr/local
make[1]: *** [configure-gdb] Error 1
make: *** [all] Error 2
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-dupes/issues
try: brew -v install --with-brewed-python gdb
https://github.com/Homebrew/homebrew-dupes/issues/277
I am trying since two days to install OpenCV 2.3.0 or 2.3.1 on my mac 10.6.8 snow leopard. I followed the following commands
$ cd /Users/ateendra/Desktop/OpenCV-2.3.0/
$ mkdir build
$ cd build/
$ cmake -D CMAKE_OSX_ARCHITECTURES=i386 -D CMAKE_C/CXX_FLAGS=-m32 ..
$ ccmake .
$ make -j8
$ sudo make install
now i get the following errors
/Users/ateendra/Desktop/OpenCV-2.3.0/modules/highgui/src/grfmt_exr.hpp:83: error: reference to ‘PixelType’ is ambiguous
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers /QuickdrawTypes.h:193: error: candidates are: typedef SInt8 PixelType
/opt/local/include/OpenEXR/ImfPixelType.h:49: error: enum Imf::PixelType
/Users/ateendra/Desktop/OpenCV-2.3.0/modules/highgui/src/grfmt_exr.hpp:83: error: ‘PixelType’ does not name a type
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/loadsave.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Well, this is a common problem to compile opencv under mac os, though it is usually solvable by modifying opencv sources a bit. (I faced this problem twice, and I always changed sources a bit to make everything compile).
However, the last time I was installing opencv, I've just used brew:
brew install opencv
Didn't have any problems with it.
I've managed to install OpenCV 2.3.1 on OSX 10.6.8, but I've done it using MacPorts, (which I recommend as it deals with dependencies and building for you):
Make sure you've got Apple Developer Tools installed (or at least XCode with the command line tools)
Install MacPorts (if you haven't done so already)
Install OpenCV via MacPorts:
sudo port install opencv
For more details see Build via MacPorts on the wiki.
I also have to mention that I did run into an error, but that was because of a previous existing dylib in the wrong place.