我试图使用我的佳能100D作为一个网络摄像头在Ubuntu17.10上。
每当我试图发射:
gphoto2 --capture-movie我返回此错误:
An error occurred in the io-library ('**Could not claim the USB device**'):
Could not claim interface 0 (Device or resource busy). Make sure no other
program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680,
spca50x) is using the device and you have read/write access to the device.摄像头是由系统检测的,我可以从它传输数据。
lsusb还展示了这个设备:
Bus 001 Device 020: ID 04a9:3270 Canon, Inc.很详细的描述,但就是这样。
也许我该..。是的,从哪里开始?
发布于 2018-01-09 12:24:30
事实证明,在背景中实际上存在gvfs-gphoto2-volume-monitor过程。
运行ps aux | grep gphoto,它的输出可能如下:
peter 25802 2.1 0.1 302504 8736 ? Ssl 13:10 0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
peter 25814 2.2 0.1 441508 11176 ? Sl 13:10 0:00 /usr/lib/gvfs/gvfsd-gphoto2 --spawner :1.3 /org/gtk/gvfs/exec_spaw/21
peter 25835 0.0 0.0 22676 1096 pts/0 S+ 13:10 0:00 grep --color=auto gphoto第一列是PID (进程id),杀死它们:
kill -9 25802
kill -9 25814现在gphoto2可以连接到摄像头了。
发布于 2019-02-22 06:50:18
彼得姆的回答原则上行得通。为了使它更简单、更快,我建议采取以下步骤:
首先查找与gphoto2相关的所有进程
pgrep -fla gphoto2
1236 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
1345 /usr/lib/gvfs/gvfsd-gphoto2 --spawner :1.4 /org/gtk/gvfs/exec_spaw/1如果它们是上面所示的,你可以安全地杀死这些
pkill -f gphoto2并愉快地拍下照片
gphoto2 --capture-image-and-download --filename pic0001.jpg发布于 2022-04-18 12:14:07
如果你的SD卡安装了魔法灯笼,你必须移除SD卡才能正常工作。
https://askubuntu.com/questions/993876
复制相似问题