首页 > 解决方案 > mac os 上的 opencv4nodejs 安装脚本失败(make[1]: *** [modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/all] 错误 2)

问题描述

我尝试在 mac os 上运行 opencv4nodejs 示例。但总是失败 - 我想我尝试了我发现的所有解决方法......我花了几天时间,不知道如何让它工作......

我目前的系统:

我尝试这样做npm install,它在 opencv4nodejs 库安装脚本中运行,但失败了..

** 日志结束 **

modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx.cpp.o
        npm ERR! [ 54%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx2.cpp.o
        npm ERR! [ 54%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.o
        npm ERR! [ 54%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/arithm.avx2.cpp.o
        npm ERR! [ 54%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/convert.avx2.cpp.o
        npm ERR! [ 55%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/convert_scale.avx2.cpp.o
        npm ERR! [ 55%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/count_non_zero.avx2.cpp.o
        npm ERR! [ 55%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/matmul.avx2.cpp.o
        npm ERR! [ 55%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/mean.avx2.cpp.o
        npm ERR! [ 55%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/merge.avx2.cpp.o
        npm ERR! [ 55%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/split.avx2.cpp.o
        npm ERR! [ 55%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/sum.avx2.cpp.o
        npm ERR! [ 55%] Linking CXX shared library ../../lib/libopencv_core.dylib
        npm ERR! [ 55%] Built target opencv_core
        npm ERR! info install if you want to use an own OpenCV installation set OPENCV4NODEJS_DISABLE_AUTOBUILD
        npm ERR! info readAutoBuildFile file does not exists: /Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/auto-build.json /Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/auto-build.json
        npm ERR! info install failed to find auto-build.json: /Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/auto-build.json
        npm ERR! info install 
        npm ERR! info install running install script...
        npm ERR! info install 
        npm ERR! info install opencv version: 3.4.6
        npm ERR! info install with opencv contrib: yes
        npm ERR! info install custom build flags: 
        npm ERR! info install 
        npm ERR! info install executing: git --version
        npm ERR! info install git --version: git version 2.30.1
        npm ERR! info install 
        npm ERR! info install executing: cmake --version
        npm ERR! info install cmake --version: cmake version 3.19.4
        npm ERR! info install 
        npm ERR! info install CMake suite maintained and supported by Kitware (kitware.com/cmake).
        npm ERR! info install 
        npm ERR! info install installing opencv version 3.4.6 into directory: /Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv
        npm ERR! Cloning into 'opencv_contrib'...
        npm ERR! remote: Enumerating objects: 2160, done.        
        remote: Counting objects: 100% (2160/2160), done.        
        remote: Compressing objects: 100% (1916/1916), done.        
        remote: Total 2160 (delta 365), reused 1101 (delta 134), pack-reused 0        
        Receiving objects: 100% (2160/2160), 50.82 MiB | 1.18 MiB/s, done.iB/s
        Resolving deltas: 100% (365/365), done.
        npm ERR! Note: switching to 'f26c98365da6af93cb5e49397b571190fca7bb55'.
        npm ERR! 
        npm ERR! You are in 'detached HEAD' state. You can look around, make experimental
        npm ERR! changes and commit them, and you can discard any commits you make in this
        npm ERR! state without impacting any branches by switching back to a branch.
        npm ERR! 
        npm ERR! If you want to create a new branch to retain commits you create, you may
        npm ERR! do so (now or later) by using -c with the switch command. Example:
        npm ERR! 
        npm ERR!   git switch -c <new-branch-name>
        npm ERR! 
        npm ERR! Or undo this operation with:
        npm ERR! 
        npm ERR!   git switch -
        npm ERR! 
        npm ERR! Turn off this advice by setting config variable advice.detachedHead to false
        npm ERR! 
        npm ERR! Cloning into 'opencv'...
        npm ERR! remote: Enumerating objects: 7328, done.        
        remote: Counting objects: 100% (7328/7328), done.        
        remote: Compressing objects: 100% (6279/6279), done.        
        remote: Total 7328 (delta 1164), reused 3957 (delta 673), pack-reused 0        
        Receiving objects: 100% (7328/7328), 81.32 MiB | 1.93 MiB/s, done./s
        Resolving deltas: 100% (1164/1164), done.
        npm ERR! Note: switching to '33b765d7979fd8a6038026aa44f6ff1a9c082b7b'.
        npm ERR! 
        npm ERR! You are in 'detached HEAD' state. You can look around, make experimental
        npm ERR! changes and commit them, and you can discard any commits you make in this
        npm ERR! state without impacting any branches by switching back to a branch.
        npm ERR! 
        npm ERR! If you want to create a new branch to retain commits you create, you may
        npm ERR! do so (now or later) by using -c with the switch command. Example:
        npm ERR! 
        npm ERR!   git switch -c <new-branch-name>
        npm ERR! 
        npm ERR! Or undo this operation with:
        npm ERR! 
        npm ERR!   git switch -
        npm ERR! 
        npm ERR! Turn off this advice by setting config variable advice.detachedHead to false
        npm ERR! 
        Updating files: 100% (6080/6080), done.0)
        npm ERR! info install running cmake [
        npm ERR! info install   '/Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/opencv',
        npm ERR! info install   '-DCMAKE_INSTALL_PREFIX=/Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/build',
        npm ERR! info install   '-DCMAKE_BUILD_TYPE=Release',
        npm ERR! info install   '-DBUILD_EXAMPLES=OFF',
        npm ERR! info install   '-DBUILD_DOCS=OFF',
        npm ERR! info install   '-DBUILD_TESTS=OFF',
        npm ERR! info install   '-DBUILD_PERF_TESTS=OFF',
        npm ERR! info install   '-DBUILD_JAVA=OFF',
        npm ERR! info install   '-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr',
        npm ERR! info install   '-DBUILD_opencv_apps=OFF',
        npm ERR! info install   '-DBUILD_opencv_aruco=OFF',
        npm ERR! info install   '-DBUILD_opencv_bgsegm=OFF',
        npm ERR! info install   '-DBUILD_opencv_bioinspired=OFF',
        npm ERR! info install   '-DBUILD_opencv_ccalib=OFF',
        npm ERR! info install   '-DBUILD_opencv_datasets=OFF',
        npm ERR! info install   '-DBUILD_opencv_dnn_objdetect=OFF',
        npm ERR! info install   '-DBUILD_opencv_dpm=OFF',
        npm ERR! info install   '-DBUILD_opencv_fuzzy=OFF',
        npm ERR! info install   '-DBUILD_opencv_hfs=OFF',
        npm ERR! info install   '-DBUILD_opencv_java_bindings_generator=OFF',
        npm ERR! info install   '-DBUILD_opencv_js=OFF',
        npm ERR! info install   '-DBUILD_opencv_img_hash=OFF',
        npm ERR! info install   '-DBUILD_opencv_line_descriptor=OFF',
        npm ERR! info install   '-DBUILD_opencv_optflow=OFF',
        npm ERR! info install   '-DBUILD_opencv_phase_unwrapping=OFF',
        npm ERR! info install   '-DBUILD_opencv_python3=OFF',
        npm ERR! info install   '-DBUILD_opencv_python_bindings_generator=OFF',
        npm ERR! info install   '-DBUILD_opencv_reg=OFF',
        npm ERR! info install   '-DBUILD_opencv_rgbd=OFF',
        npm ERR! info install   '-DBUILD_opencv_saliency=OFF',
        npm ERR! info install   '-DBUILD_opencv_shape=OFF',
        npm ERR! info install   '-DBUILD_opencv_stereo=OFF',
        npm ERR! info install   '-DBUILD_opencv_stitching=OFF',
        npm ERR! info install   '-DBUILD_opencv_structured_light=OFF',
        npm ERR! info install   '-DBUILD_opencv_superres=OFF',
        npm ERR! info install   '-DBUILD_opencv_surface_matching=OFF',
        npm ERR! info install   '-DBUILD_opencv_ts=OFF',
        npm ERR! info install   '-DBUILD_opencv_xobjdetect=OFF',
        npm ERR! info install   '-DBUILD_opencv_xphoto=OFF',
        npm ERR! info install   '-DWITH_VTK=OFF',
        npm ERR! info install   '-DOPENCV_ENABLE_NONFREE=ON',
        npm ERR! info install   '-DOPENCV_EXTRA_MODULES_PATH=/Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/opencv_contrib/modules'
        npm ERR! info install ]
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! * Closing connection 0
        npm ERR! info install starting build...
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../../../lib/libnumeric.a(poly.cc.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../../../lib/libnumeric.a(poly.cc.o) has no symbols
        npm ERR! In file included from /Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview/fundamental.cc:24:
        npm ERR! In file included from /usr/local/include/ceres/ceres.h:37:
        npm ERR! In file included from /usr/local/include/ceres/autodiff_cost_function.h:130:
        npm ERR! In file included from /usr/local/include/ceres/internal/autodiff.h:148:
        npm ERR! In file included from /usr/local/include/ceres/internal/array_selector.h:38:
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:47:1: error: unknown type name 'constexpr'
        npm ERR! constexpr static auto kFixedArrayUseDefault = static_cast<size_t>(-1);
        npm ERR! ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:47:18: error: cannot combine with previous 'static' declaration specifier
        npm ERR! constexpr static auto kFixedArrayUseDefault = static_cast<size_t>(-1);
        npm ERR!                  ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:59:57: error: a space is required between consecutive right angle brackets (use '> >')
        npm ERR!                               Eigen::aligned_allocator<T>>::type;
        npm ERR!                                                         ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:86:52: error: a space is required between consecutive right angle brackets (use '> >')
        npm ERR!           typename A = FixedArrayDefaultAllocator<T>>
        npm ERR!                                                    ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:91:10: error: unknown type name 'constexpr'
        npm ERR!   static constexpr size_t kInlineBytesDefault = 256;
        npm ERR!          ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:91:26: error: expected ';' at end of declaration list
        npm ERR!   static constexpr size_t kInlineBytesDefault = 256;
        npm ERR!                          ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:100:10: error: unknown type name 'constexpr'
        npm ERR!   static constexpr bool DefaultConstructorIsNonTrivial() {
        npm ERR!          ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:118:10: error: unknown type name 'constexpr'
        npm ERR!   static constexpr size_type inline_elements =
        npm ERR!          ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:118:29: error: expected ';' at end of declaration list
        npm ERR!   static constexpr size_type inline_elements =
        npm ERR!                             ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:149:19: error: no template named 'initializer_list' in namespace 'std'
        npm ERR!   FixedArray(std::initializer_list<value_type> init_list,
        npm ERR!              ~~~~~^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:164:16: error: expected ';' at end of declaration list
        npm ERR!   ~FixedArray() noexcept {
        npm ERR!                ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:185:3: error: unknown type name 'constexpr'
        npm ERR!   constexpr size_type max_size() const {
        npm ERR!   ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:185:13: error: duplicate member 'size_type'
        npm ERR!   constexpr size_type max_size() const {
        npm ERR!             ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:111:9: note: previous declaration is here
        npm ERR!   using size_type = typename AllocatorTraits::size_type;
        npm ERR!         ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:185:22: error: expected ';' at end of declaration list
        npm ERR!   constexpr size_type max_size() const {
        npm ERR!                      ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:367:33: error: use of undeclared identifier 'StorageElementWrapper'
        npm ERR!                                 StorageElementWrapper<value_type>,
        npm ERR!                                 ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:368:46: error: expected ';' after alias declaration
        npm ERR!                                 value_type>::type;
        npm ERR!                                              ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:371:30: error: no template named 'StorageElementWrapper'
        npm ERR!   static pointer AsValueType(StorageElementWrapper<value_type>* ptr) {
        npm ERR!                              ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:375:24: error: use of undeclared identifier 'StorageElement'
        npm ERR!   static_assert(sizeof(StorageElement) == sizeof(value_type), "");
        npm ERR!                        ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:376:52: error: unexpected type name 'value_type': expected expression
        npm ERR!   static_assert(alignof(StorageElement) == alignof(value_type), "");
        npm ERR!                                                    ^
        npm ERR! fatal error: too many errors emitted, stopping now [-ferror-limit=]
        npm ERR! 20 errors generated.
        npm ERR! make[2]: *** [modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/fundamental.cc.o] Error 1
        npm ERR! make[2]: *** Waiting for unfinished jobs....
        npm ERR! In file included from /Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview/homography.cc:24:
        npm ERR! In file included from /usr/local/include/ceres/ceres.h:37:
        npm ERR! In file included from /usr/local/include/ceres/autodiff_cost_function.h:130:
        npm ERR! In file included from /usr/local/include/ceres/internal/autodiff.h:148:
        npm ERR! In file included from /usr/local/include/ceres/internal/array_selector.h:38:
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:47:1: error: unknown type name 'constexpr'
        npm ERR! constexpr static auto kFixedArrayUseDefault = static_cast<size_t>(-1);
        npm ERR! ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:47:18: error: cannot combine with previous 'static' declaration specifier
        npm ERR! constexpr static auto kFixedArrayUseDefault = static_cast<size_t>(-1);
        npm ERR!                  ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:59:57: error: a space is required between consecutive right angle brackets (use '> >')
        npm ERR!                               Eigen::aligned_allocator<T>>::type;
        npm ERR!                                                         ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:86:52: error: a space is required between consecutive right angle brackets (use '> >')
        npm ERR!           typename A = FixedArrayDefaultAllocator<T>>
        npm ERR!                                                    ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:91:10: error: unknown type name 'constexpr'
        npm ERR!   static constexpr size_t kInlineBytesDefault = 256;
        npm ERR!          ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:91:26: error: expected ';' at end of declaration list
        npm ERR!   static constexpr size_t kInlineBytesDefault = 256;
        npm ERR!                          ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:100:10: error: unknown type name 'constexpr'
        npm ERR!   static constexpr bool DefaultConstructorIsNonTrivial() {
        npm ERR!          ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:118:10: error: unknown type name 'constexpr'
        npm ERR!   static constexpr size_type inline_elements =
        npm ERR!          ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:118:29: error: expected ';' at end of declaration list
        npm ERR!   static constexpr size_type inline_elements =
        npm ERR!                             ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:149:19: error: no template named 'initializer_list' in namespace 'std'
        npm ERR!   FixedArray(std::initializer_list<value_type> init_list,
        npm ERR!              ~~~~~^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:164:16: error: expected ';' at end of declaration list
        npm ERR!   ~FixedArray() noexcept {
        npm ERR!                ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:185:3: error: unknown type name 'constexpr'
        npm ERR!   constexpr size_type max_size() const {
        npm ERR!   ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:185:13: error: duplicate member 'size_type'
        npm ERR!   constexpr size_type max_size() const {
        npm ERR!             ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:111:9: note: previous declaration is here
        npm ERR!   using size_type = typename AllocatorTraits::size_type;
        npm ERR!         ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:185:22: error: expected ';' at end of declaration list
        npm ERR!   constexpr size_type max_size() const {
        npm ERR!                      ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:367:33: error: use of undeclared identifier 'StorageElementWrapper'
        npm ERR!                                 StorageElementWrapper<value_type>,
        npm ERR!                                 ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:368:46: error: expected ';' after alias declaration
        npm ERR!                                 value_type>::type;
        npm ERR!                                              ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:371:30: error: no template named 'StorageElementWrapper'
        npm ERR!   static pointer AsValueType(StorageElementWrapper<value_type>* ptr) {
        npm ERR!                              ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:375:24: error: use of undeclared identifier 'StorageElement'
        npm ERR!   static_assert(sizeof(StorageElement) == sizeof(value_type), "");
        npm ERR!                        ^
        npm ERR! /usr/local/include/ceres/internal/fixed_array.h:376:52: error: unexpected type name 'value_type': expected expression
        npm ERR!   static_assert(alignof(StorageElement) == alignof(value_type), "");
        npm ERR!                                                    ^
        npm ERR! fatal error: too many errors emitted, stopping now [-ferror-limit=]
        npm ERR! 20 errors generated.
        npm ERR! make[2]: *** [modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/homography.cc.o] Error 1
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_jbig.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_jpeg_12.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_lzma.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_ojpeg.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_pixarlog.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_webp.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_zstd.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_jbig.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_jpeg_12.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_lzma.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_ojpeg.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_pixarlog.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_webp.c.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibtiff.a(tif_zstd.c.o) has no symbols
        npm ERR! /Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/opencv/3rdparty/libwebp/src/enc/picture_csp_enc.c:1002:40: warning: result of '2 ^ ALPHA_OFFSET' is 1; did you mean '1 << ALPHA_OFFSET' (8)? [-Wxor-used-as-pow]
        npm ERR!     const uint8_t* const g = argb + (2 ^ ALPHA_OFFSET);
        npm ERR!                                      ~~^~~~~~~~~~~~~~
        npm ERR!                                      1 << ALPHA_OFFSET
        npm ERR! /Users/vetrtech/Documents/horoscopes/neural_network/opencv4nodejs-master/node_modules/opencv-build/opencv/opencv/3rdparty/libwebp/src/enc/picture_csp_enc.c:1002:40: note: replace expression with '0x2 ^ ALPHA_OFFSET' to silence this warning
        npm ERR! 1 warning generated.
        npm ERR! make[1]: *** [modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/all] Error 2
        npm ERR! make[1]: *** Waiting for unfinished jobs....
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libIlmImf.a(IlmThread.cpp.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libIlmImf.a(IlmThreadMutex.cpp.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libIlmImf.a(IlmThreadSemaphore.cpp.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libIlmImf.a(IlmThreadSemaphorePosix.cpp.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libIlmImf.a(IlmThread.cpp.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libIlmImf.a(IlmThreadMutex.cpp.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libIlmImf.a(IlmThreadSemaphore.cpp.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libIlmImf.a(IlmThreadSemaphorePosix.cpp.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(arenastring.cc.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(io_win32.cc.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(gzip_stream.cc.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(arenastring.cc.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(io_win32.cc.o) has no symbols
        npm ERR! /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(gzip_stream.cc.o) has no symbols
        npm ERR! make: *** [all] Error 2
        npm ERR! ERR! child process exited with code 2 (for more info, set '--loglevel silly')
        
        npm ERR! A complete log of this run can be found in:

标签: npm-installopencv4nodejs

解决方案


推荐阅读