ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

missing libv4l2.h file during compilation

asked 2018-04-05 02:12:27 -0500

eirikaso gravatar image

updated 2018-04-05 02:13:09 -0500

Hi I'm trying to compile a package on an odroid but get the error that I'm missing libv4l2.h that is a dependency for the camera driver package I'm installing ( ). I have already installed and tested the package on my desktop computer, but my cameras will be connected to the Odroid.

I have installed the v4l2 using the

sudo apt-get install v4l-utils

command. I thought this would install all the files and headers I needed but apparently not. I can't remember to have done anything else on my desktop to get it working. Anyone have any tips on this? I think there are some other .h files missing as well, but I don't think the compiler picked them up as the compilation was terminated due to this error

Here is the error I receive

In file included from /root/catkin_ws/src/camera_umd/uvc_camera/src/stereo.cpp:6:0:/root/catkin_ws/src/camera_umd/uvc_camera/include/uvc_cam/uvc_cam.h:26:21: fatal error: libv4l2.h: No such file or directory compilation terminated.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-05 02:50:09 -0500

eirikaso gravatar image

Figured it out I had to install the following

apt-get install libv4l-dev
edit flag offensive delete link more


What process did you use to setup your build environment? If rosdep didn't install those dependencies then something would seem to be incorrectly setup on the uvc_camera side.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-05 03:55:28 -0500 )edit

I used catkin build if that is what you mean. Didn't use rosdep prior to that. Maybe that would have fixed it automatically?

eirikaso gravatar image eirikaso  ( 2018-04-05 04:01:18 -0500 )edit

Yes. Just cloning a repository is not enough. See #q252478 for the general procedure (adapt pkg and ROS version names).

gvdhoorn gravatar image gvdhoorn  ( 2018-04-05 04:11:10 -0500 )edit

Thank you! I've just been fiddeling blindly around until it works :D This will make things easier!

eirikaso gravatar image eirikaso  ( 2018-04-05 04:18:13 -0500 )edit

Question Tools


Asked: 2018-04-05 02:12:27 -0500

Seen: 9,255 times

Last updated: Apr 05 '18