ubuntu安装zbar二维码扫描

  • Post author:
  • Post category:其他


wget http://downloads.sourceforge.NET/project/zbar/zbar/0.10/zbar-0.10.tar.gz
1. tar -zvxf zbar-0.10.tar.gz

2. $ sudo apt-get install libqt4-dev
3. $sudo apt-get install libv4l-dev
4. $ sudo ln -s  /usr/include/libv4l1-videodev.h  /usr/include/linux/videodev.h
5. $ sudo apt-get install python-gtk2-dev
6. $sudo apt-get install imagemagick libmagickwand-dev
7. $sudo apt-get install PHP-pear php5-dev   //如果没有php5-dev,可以尝试phpx-dev

a $ export CFLAGS=""
b $ ./configure
c $ make
d $ sudo make install
1 出错:
    configure: error: in `/home/huazai/user_dir/libdecodeqr/zbar-0.10':
    configure: error: test for video support failed!

    解决:
    $sudo apt-get install libv4l-dev

    $sudo ln -s  /usr/include/libv4l1-videodev.h  /usr/include/linux/videodev.h

2 出错:
    configure: error: in `/home/huazai/user_dir/zbar/zbar-0.10':
    configure: error: Unable to find ImageMagick >= 6.2.6:

    No package 'MagickWand' found

    解决:
解决问题:        
    1. 安装 ImageMagick :
     $sudo apt-get install imagemagick libmagickwand-dev

3 执行时出错
    zbarcam: error while loading shared libraries: libzbar.so.0: cannot open shared object file: No such file or directory

解决问题:
     sudo apt-get install PHP-pear php5-dev



版权声明:本文为hua_zai_arm原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。