gpt4 book ai didi

macos - 尝试使用自制软件安装 opencv。错误 : modules/highgui/CMakeFiles/opencv_highgui. 目录/所有错误 2

转载 作者:太空宇宙 更新时间:2023-11-03 21:54:28 31 4
gpt4 key购买 nike

我有 mac,os x 10.8.3

我曾经安装过 macports,我删除了它并尝试使用 Homebrew 安装 opencv。

我安装了 lame,ffmpeg。更改了 $PATH。错误还是一样:

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 在安装 ffmpeg 之前是可以的。现在它告诉:

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

但是过去 24 小时的错误是相同的。我很生气,很绝望。不知道如何安装这个该死的 OpenCV。

最佳答案

2013 年 10 月这对我有用:

首先brew 更新 以确保自制软件是最新的然后 brew doctor 并确保 homebrew 报告没有问题

然后,brew tap homebrew/science 指向最新的 opencv

然后brew install opencv

祝你好运!

关于macos - 尝试使用自制软件安装 opencv。错误 : modules/highgui/CMakeFiles/opencv_highgui. 目录/所有错误 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16365549/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com