linux/videodev.h : no such file or directory - OpenCV on ubuntu 11.04

前端 未结 5 2120
小鲜肉
小鲜肉 2020-12-23 11:26

I tried to install OpenCV2.2 on Ubuntu 11.04. But OpenCV compilation fails stating an error related to linux/videodev.h file. File available in /user/includes/linux is name

5条回答
  •  温柔的废话
    2020-12-23 11:36

    The current answer is incomplete. Installing libv4l-dev creates a /usr/include/linux/videodev2.h but doesn't solve the stated problem of not being able to find linux/videodev.h. The library does ship header files for compatibility, but fails to put them where applications will look for them.

    sudo apt-get install libv4l-dev
    cd /usr/include/linux
    sudo ln -s ../libv4l1-videodev.h videodev.h
    

    This provides a linux/videodev.h, and of the right version (1).

提交回复
热议问题