I'm trying to install Zbar but I am having an issue with ./configure:

checking linux/videodev.h usability... no
checking linux/videodev.h presence... no
checking for linux/videodev.h... no
configure: error: in `/home/pi/zbar':
configure: error: test for video support failed!
rebuild your kernel to include video4linux support or
configure --disable-video to skip building video support.

This is what I've done so far:

# Get the latest Raspbian packages

sudo apt-get update
sudo apt-get upgrade

### download and compile the JPEG library

wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz    
tar xvfz jpegsrc.v8c.tar.gz
cd jpeg-8c
./configure --enable-shared --prefix=$CONFIGURE_PREFIX
sudo make install

### link the libraries correctly - RASPBERRY PI ONLY

sudo ln -s /usr/lib/arm-linux-gnueabi/libjpeg.so /usr/lib
sudo ln -s /usr/lib/arm-linux-gnueabi/libfreetype.so /usr/lib
sudo ln -s /usr/lib/arm-linux-gnueabi/libz.so /usr/lib

### install rest of the libraries, as well as freetrype and zlib

sudo apt-get install libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev

### re-install PIL
sudo pip install pillow

# Get the source code for the V4L utilities

git clone git://git.linuxtv.org/v4l-utils.git
cd v4l-utils

# Install some packages needed to build it
sudo apt-get install autoconf gettext libtool

# Configure and build it.
sudo make install

# Load the module video0
sudo modprobe bcm2835-v4l2

I have downloaded the latest Zbar firmware from here.

Any ideas? I want to build it with video support, so deactivating it takes no sense.

1 Answer 1


Found the solution here :

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

But I needed more dependencies (solution found here) :

sudo apt-get install libperl-dev
sudo apt-get install libgtk2.0-dev

Then I had to install pygtk but it seems needing python-gobject-dev to compile :

sudo apt-get install python-gobject-dev

Downloaded the latest stable release of PyGTK here and installed it.

and then I tried in Zbar directory : ./configure --without-imagemagick --without-qt

I can't find a way to install ImageMagick on my Rpi then I had to putt --without-imagemagick but then the prompt told me that the zbarimg file scanner will *NOT* be built...

Well with this I could FINALLY install it !

Maybe I'm going to use Picamera library with QRtools ...


This should work and it is EASIER to install Zbar !

sudo apt-get install python-qrtools
sudo apt-get install libzbar-dev
sudo pip install zbar
  • There is a Segmentation Fault error when importing qrtools in python when zbar is installed. Removing zbar resolved the problem.
    – Tagadac
    Feb 16, 2016 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.