MaxOSX下安装OpenCV报错,求解?


安装步骤如下:
先安装cmake,直接官网下源码。解压后cd到解压的文件夹,然后


 ./bootstrap 
make 
make install

于是cmake就搞定了。

然后安装opencv,还是官网下源码包解压,进入解压后的文件夹,


 mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
make

于是报错如下:

[ 35%] Linking CXX shared library ../../lib/libopencv_videoio.dylib
Undefined symbols for architecture x86_64:
"_SSLClose", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
_tls_close in libavformat.a(tls_securetransport.o)
"_SSLCopyPeerTrust", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLCreateContext", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLHandshake", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLRead", referenced from:
_tls_read in libavformat.a(tls_securetransport.o)
"_SSLSetCertificate", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLSetConnection", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLSetIOFuncs", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLSetPeerDomainName", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLSetSessionOption", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLWrite", referenced from:
_tls_write in libavformat.a(tls_securetransport.o)
"_SecIdentityCreate", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SecItemImport", referenced from:
_import_pem in libavformat.a(tls_securetransport.o)
"_SecTrustEvaluate", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SecTrustSetAnchorCertificates", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_iconv", referenced from:
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_close", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_open", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_swr_alloc", referenced from:
_opus_decode_init in libavcodec.a(opusdec.o)
"_swr_close", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
_opus_decode_flush in libavcodec.a(opusdec.o)
"_swr_convert", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
"_swr_free", referenced from:
_opus_decode_close in libavcodec.a(opusdec.o)
"_swr_init", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
"_swr_is_initialized", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.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_videoio.3.0.0.dylib] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [all] Error 2

make makefile opencv macosx yosemite

AKIKO 10 years, 4 months ago

Your Answer