我尝试安装 gspca 以在 Ubuntu 12.04 64 位上运行 Orite 网络摄像头,但失败了。
它丢失了很多标题,这是我的说明,但失败了。
wget http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz
tar zxvf gspcav1-20071224.tar.gz
cd gspcav1-20071224/
sudo ./gspca_build
sudo touch /usr/src/linux-headers-3.2.0-25-generic/include/linux/config.h
sudo mkdir /usr/src/linux-headers-3.2.0-25-generic/include/asm
sudo touch /usr/src/linux-headers-3.2.0-25-generic/include/asm/semaphore.h
sudo touch /usr/src/linux-headers-3.2.0-25-generic/include/linux/videodev.h
sudo touch /usr/src/linux-headers-3.2.0-25-generic/include/linux/smp_lock.h
如何解决?
我移步/usr/src
并制作:
sam@sam:/usr/src/gspcav1-20071224$ sudo make
make -C /lib/modules/`uname -r`/build SUBDIRS=/usr/src/gspcav1-20071224 CC=cc modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-25-generic'
CC [M] /usr/src/gspcav1-20071224/gspca_core.o
/usr/src/gspcav1-20071224/gspca_core.c:37:26: fatal error: linux/config.h: No such file or directory
compilation terminated.
make[2]: *** [/usr/src/gspcav1-20071224/gspca_core.o] Error 1
make[1]: *** [_module_/usr/src/gspcav1-20071224] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-25-generic'
make: *** [default] Error 2
sam@sam:/usr/src/gspcav1-20071224$
答案1
我已经找到了解决方案 http://ubuntuforums.org/showthread.php?t=1746591
像这样
/*
#ifndef AUTOCONF_INCLUDED
#include <linux/config.h>
#endif
*/
答案2
尝试:
wget http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz
sudo mv gspcav1-20071224.tar.gz /usr/src
cd /usr/src
sudo tar zxvf gspcav1-20071224.tar.gz
sudo apt-get install linux-headers-$(uname -r) build-essential make automake autoconf g++ gcc
sudo apt-get remove --purge gspca*
cd gspcav1-20071224
sudo make
sudo make install
sudo depmod -ae
sudo modprobe gspca