一、linux/videodev.h: 没有那个文件或目录
错误提示:Looking for linux/videodev.h - not found
解决办法:
1.sudo apt-get install libv4l-dev
2.sudo ln -s /usr/include/libvl1-videodev.h /usr/include/linux/videodev.h(如果还是不行就删除之后在执行这句)
二、sys/videoio.h: 没有那个文件或目录
错误提示:Looking for sys/videoio.h - not found
解决办法:
sudo cp /usr/include/opencv2/videoio/videoio_c.h /usr/include/x86_64-linux-gnu/sys
sudo ln -s /usr/include/x86_64-linux-gnu/sys/videoio_c.h /usr/include/x86_64-linux-gnu/sys/videoio.h
或者
在usr/include中新建sys文件夹,从网上下载videoio.h,或者直接touch一个(不影响使用)(也可以新建一个空白文件即可,里面不用写任何信息)
如果你对源码进行了修改,则需要通过修改后源码的videoio_c.h进行操作,具体如下
修改opencv-3.4.0/modules/videoio/include/opencv2/videoio/videoio_c.h中头文件的路径,将相对变成绝对路径即可(这里的opencv2是core文件下的,不是include下的)
sudo -s
cp ~opencv-3.4.0/modules/videoio/include/opencv2/videoio/videoio_c.h /usr/include/x86_64-linux-gnu/sys
sudo ln -s /usr/include/x86_64-linux-gnu/sys/videoio_c.h /usr/include/x86_64-linux-gnu/sys/videoio.h
三、Looking for ccache - not found
sudo apt install ccache
四、io.h: 没有这个头文件
将/usr/include/86_64-linux-gnu/sys下的io.h复制到/usr/include下面 链接
五、/usr/local/lib/libcurl.so.4: no version information available
sudo rm -rf /usr/local/lib/libcurl.so.4
ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0 /usr/local/lib/libcurl.so.4
六、libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared
打开libx264.c,找到相应的代码行,将“x264_bit_depth”改成“X264_BIT_DEPTH”即可
七、Package ‘gtk±3.0’ not found or Package ‘gtk±2.0’ not found
sudo apt-get install build-essential libgtk-3-dev
sudo apt-get install libgtk2.0-dev
八、在make时报错(附截图)…so’ failed
解决办法:make clean 然后在rebuild即可