首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装爱普生Linux扫描器驱动程序时语法错误(用于v550)

安装爱普生Linux扫描器驱动程序时语法错误(用于v550)
EN

Ask Ubuntu用户
提问于 2019-09-10 18:26:47
回答 1查看 1.8K关注 0票数 4

我有爱普生v550扫描仪,并下载了最新的官方驱动文件。

http://support.epson.net/linux/en/iscan.php?model=perfection-v550&version=2.30.4

当我解压缩文件并尝试安装iscan-data包时,我会得到以下错误:

代码语言:javascript
复制
sudo dpkg -i iscan-data_1.39.1-2_all.deb 
[sudo] password for brylie: 
(Reading database ... 342144 files and directories currently installed.)
Preparing to unpack iscan-data_1.39.1-2_all.deb ...
Unpacking iscan-data (1.39.1-2) over (1.39.1-2) ...
Setting up iscan-data (1.39.1-2) ...
expr: syntax error: missing argument after ‘-’
tail: invalid number of lines: ‘/lib/udev/rules.d/60-libsane.rules’

注意:我在运行./install.sh时遇到同样的错误,它只是与iscan-data包有关。

如何修复导致.deb安装中断的语法错误?

编辑:

代码语言:javascript
复制
$ dpkg -S /lib/udev/rules.d/60-libsane.rules
libsane:i386, libsane:amd64: /lib/udev/rules.d/60-libsane.rules
代码语言:javascript
复制
$ cat /lib/udev/rules.d/60-libsane.rules
# This file was automatically created based on description files (*.desc)
# by sane-desc 3.5 from sane-backends 1.0.27
#
# udev rules file for supported USB and SCSI devices
#
# For the list of supported USB devices see /usr/lib/udev/hwdb.d/20-sane.hwdb
#
# The SCSI device support is very basic and includes only
# scanners that mark themselves as type "scanner" or
# SCSI-scanners from HP and other vendors that are entitled "processor"
# but are treated accordingly.
#
# If your SCSI scanner isn't listed below, you can add it to a new rules
# file under /etc/udev/rules.d/.
#
# If your scanner is supported by some external backend (brother, epkowa,
# hpaio, etc) please ask the author of the backend to provide proper
# device detection support for your OS
#
# If the scanner is supported by sane-backends, please mail the entry to
# the sane-devel mailing list (sane-devel@lists.alioth.debian.org).
#
ACTION!="add", GOTO="libsane_rules_end"

# The following rule will disable USB autosuspend for the device
ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"

SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
GOTO="libsane_rules_end"

LABEL="libsane_scsi_rules_begin"
KERNEL!="sg[0-9]*", GOTO="libsane_rules_end"

# Generic: SCSI device type 6 indicates a scanner
ATTRS{type}=="6", ENV{libsane_matched}="yes"

# Some scanners advertise themselves as SCSI device type 3

# Wildcard: for some Epson SCSI scanners
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER*", ENV{libsane_matched}="yes"

# Epson Expression 800 | Epson Expression 800
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Expression800", ENV{libsane_matched}="yes"

# Epson Perfection 2450 | Epson GT-9700F | Epson Perfection 2450 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"

# Epson Perfection 3200 | Epson GT-9800F | Epson Perfection 3200 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"

# Epson GT-X900 | Epson Perfection V700 Photo | Epson Perfection V750 Photo
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-X900", ENV{libsane_matched}="yes"

# Epson Perfection 636S | Epson Perfection 1200S | Epson Perfection 1200S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"

# Epson Perfection 636 | Epson Perfection 636S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1130A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIc
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1750A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIp
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1790A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIcx
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2500A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4c
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2520A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 5p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C5110A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6200C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C6270A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6300C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C7670A", ENV{libsane_matched}="yes"


LABEL="libsane_rules_end"
EN

回答 1

Ask Ubuntu用户

发布于 2019-11-10 10:27:04

我正在使用Debian 10 (Buster),我也发现了同样的问题。该错误的根源在/usr/lib/iscan-data/make-policy-file文件中,该文件包含在iscan-data_1.39.1-2_all.deb包中。它试图在{idProduct}文件中查找/usr/lib/udev/rules.d/60-libsane.rules字符串。但是该文件的内容在Debian 9和10之间发生了很大的变化,所以它找不到这样的字符串,并且失败了。我想这也可能发生在Ubuntu。尽管有这个错误,SANE后端似乎安装得很好.

除了这个问题之外,我还发现了一个与60-libsane.rules文件有关的问题:它不再包含授予scanner组访问扫描器总线的规则。因此,我只能通过命令行与root用户进行扫描。有关更多信息,请查看此错误报告。在添加了类似于报告中提到的udev规则之后,现在我可以使用我的用户和GUI再次扫描。我的规则如下:

代码语言:javascript
复制
ENV{ID_VENDOR_ID}=="04b8", ENV{ID_MODEL_ID}=="0130", RUN+="/usr/bin/bash -c '/usr/bin/setfacl -m g:scanner:rw $env{DEVNAME}'"

我需要通过供应商ID和模型ID (在我的例子中是爱普生完美V500照片)进行过滤,因为libsane_matched属性似乎是空的。我想,由于第1段中提到的安装程序的问题,它没有被正确设置。

票数 3
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1172255

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档