YouTube-8M feature extraction
Error 1 fatal error: opencv2/core.hpp: No such file or directory
ERROR: /data/menglingjun/mediapipe/mediapipe/framework/formats/BUILD:163:1: C++ compilation of rule '//mediapipe/framework/formats:image_frame_opencv' failed (Exit 1) gcc failed: error executing command /usr/local/gcc/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 70 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
In file included from ./mediapipe/framework/formats/image_frame_opencv.h:20:0,
from mediapipe/framework/formats/image_frame_opencv.cc:15:
./mediapipe/framework/port/opencv_core_inc.h:18:36: fatal error: opencv2/core/version.hpp: No such file or directory
compilation terminated.
没有找到opencv2/core/version.hpp
解决方案:修改./mediapipe/framework/port/opencv_core_inc.h中的路径,我的是opencv4,在路径/opencv/include/opencv4/opencv2下,所以改为
#include <opencv4/opencv2/core/version.hpp>
#ifdef CV_VERSION_EPOCH // for OpenCV 2.x
#include <opencv4/opencv2/core/core.hpp>
#else
#include <opencv4/opencv2/core/core.hpp>
Error2 fatal error: libavcodec/avcodec.h: No such file or directory
ERROR: /data/menglingjun/mediapipe/mediapipe/util/BUILD:67:1: C++ compilation of rule '//mediapipe/util:audio_decoder' failed (Exit 1) gcc failed: error executing command /usr/local/gcc/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 81 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
In file included from mediapipe/util/audio_decoder.cc:15:0:
./mediapipe/util/audio_decoder.h:33:32: fatal error: libavcodec/avcodec.h: No such file or directory