我一直收到这个错误;
xsane: symbol lookup error: /usr/lib/x86_64-linux-gnu/libsane.so.1: undefined symbol: libusb_set_option
和这个错误;
checking for sane_open in -lsane... no
configure: error: cannot find sane-backends-devel support (or --disable-scan-build)"
when trying to install hplip-3.20.5
我从 Ubuntu 19 开始就遇到了这个问题,我现在正在使用 Ubuntu 20.04。我已经重新安装了libusb-1
,libsane.so.1
我正在尝试安装 HP 多功能打印机“HP Office jet pro 9018”
首先,以下是 tl;dr --
apt-cache policy xsane libsane1 libsane-common libusb-1.0
xsane:
Installed: 0.999-8ubuntu2
Candidate: 0.999-8ubuntu2
Version table:
*** 0.999-8ubuntu2 500
500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
100 /var/lib/dpkg/status
libsane1:
Installed: 1.0.30+git20200801-focal0
Candidate: 1.0.30+git20200802-focal0
Version table:
1.0.30+git20200802-focal0 500
500 http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu focal/main amd64 Packages
*** 1.0.30+git20200801-focal0 100
100 /var/lib/dpkg/status
1.0.29-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
libsane-common:
Installed: 1.0.30+git20200801-focal0
Candidate: 1.0.30+git20200802-focal0
Version table:
1.0.30+git20200802-focal0 500
500 http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu focal/main amd64 Packages
500 http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu focal/main i386 Packages
*** 1.0.30+git20200801-focal0 100
100 /var/lib/dpkg/status
1.0.29-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
500 http://archive.ubuntu.com/ubuntu focal/main i386 Packages
libusb-1.0-0:
Installed: 2:1.0.23-2build1
Candidate: 2:1.0.23-2build1
Version table:
*** 2:1.0.23-2build1 500
500 htt_://archive.ubuntu.com/ubuntu focal/main amd64 Packages
100 /var/lib/dpkg/status
libusb-1.0-0-dev:
Installed: 2:1.0.23-2build1
Candidate: 2:1.0.23-2build1
Version table:
*** 2:1.0.23-2build1 500
500 htt_://archive.ubuntu.com/ubuntu focal/main amd64 Packages
100 /var/lib/dpkg/status
libusb-1.0-doc:
Installed: 2:1.0.23-2build1
Candidate: 2:1.0.23-2build1
Version table:
*** 2:1.0.23-2build1 500
500 htt_://archive.ubuntu.com/ubuntu focal/main amd64 Packages
500 htt_://archive.ubuntu.com/ubuntu focal/main i386 Packages
100 /var/lib/dpkg/status
谢谢-现在一切都完成了,错误是;
$ hp-setup 192.168.10.10
error: Unable to locate models.dat file
HP Linux Imaging and Printing System (ver. 0.0.0)
Printer/Fax Setup Utility ver. 9.0
Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)
Traceback (most recent call last):
File "/usr/share/hplip/base/models.py", line 558, in __getitem__
return self.__cache[model]
KeyError: 'hp_officejet_pro_9010_series'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/hp-setup", line 358, in <module>
device_uri, sane_uri, fax_uri = device.makeURI(param, jd_port)
File "/usr/share/hplip/base/device.py", line 416, in makeURI
mq = queryModelByURI(cups_uri)
File "/usr/share/hplip/base/device.py", line 457, in queryModelByURI
return queryModelByModel(model)
File "/usr/share/hplip/base/device.py", line 446, in queryModelByModel
return model_dat[model]
File "/usr/share/hplip/base/models.py", line 564, in __getitem__
if self.read_section(self.released_dat, model):
File "/usr/share/hplip/base/models.py", line 474, in read_section
fd = open(filename)
models.dat 文件如下所示;
$ ls -al /usr/share/hplip/models/
total 8
drwxr-xr-x 2 root root 4096 Aug 15 07:08 .
drwxr-xr-x 13 root root 4096 Aug 15 07:08 ..
lrwxrwxrwx 1 root root 39 Aug 15 07:08 models.dat -> /usr/share/hplip/data/models/models.dat
当我尝试运行 xsane 时出现此问题;
xsane: symbol lookup error: /usr/lib/x86_64-linux-gnu/libsane.so.1: undefined symbol: libusb_set_option
答案1
看起来你使用 PPA 弄乱了一些东西。使用以下命令删除它:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:rolfbensch/sane-git
然后通过以下方式从官方存储库重新安装 sane:
sudo apt-get install --reinstall libsane1=1.0.29-0ubuntu5 libsane-common=1.0.29-0ubuntu5
关于 HPLIP,请考虑通过运行以下命令从存储库安装它:
sudo apt-get install hplip-gui
随后hp-setup
是
hp-plugin
因为您可能需要它来支持您设备的扫描仪。
答案2
按照 #1 的指示操作后,存储库 hplip 不起作用,并收到与 libusb、libsane 等相关的错误。我尝试重新安装,但无济于事。查看 /usr/local/lib/ 我发现;
-rw-r--r-- 1 root root 574248 Apr 3 2015 libusb-1.0.a
-rwxr-xr-x 1 root root 954 Apr 3 2015 libusb-1.0.la
lrwxrwxrwx 1 root root 19 Apr 3 2015 libusb-1.0.so -> libusb-1.0.so.0.1.0
lrwxrwxrwx 1 root root 19 Apr 3 2015 libusb-1.0.so.0 -> libusb-1.0.so.0.1.0
-rwxr-xr-x 1 root root 334416 Apr 3 2015 libusb-1.0.so.0.1.0
注意日期。我删除了 libusb-1.0.so.0.1.0 并通过以下方式重新安装
sudo apt-get install --reinstall libusb-1.0.0
sane 开始工作,但存储库“hplip”抱怨找不到 models.dat 文件。我安装了 HP 的 hplip-3.20.6,现在我有打印机和扫描仪
解决了