我刚刚更新到 Ubuntu 20.04。“打印机”“选择驱动程序”“更改驱动程序”列表的选项列表没有像在 Ubuntu 18.04 中那样显示。这会无限期地显示。
我尝试通过添加以下 3 个存储库来解决这个问题,但没有成功:
deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
我期望的是打印机制造商列表(包括 Brother、Canon、HP),然后能够选择制造商下的打印机型号。
我实际上试图安装的是HP LaserJet 1012驱动程序为 STP02205.PPD。我在网上找不到此驱动程序文件。此文件位于Ubuntu 18.04。
当我尝试
sudo apt-get --reinstall install hplip hplip-gui
然后运行
sudo ./hplip-3.20.6.run
脚本卡在:
Running 'sudo apt-get install --assume-yes python-pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
Would you like to retry installing the missing package(s)
我已经添加了存储库universe
我不确定是否hplip-3.20.6.run
想使用Python 2.7(现已走到生命尽头)或Python 3。
脚本hplip-3.20.6.run
结束运行并显示以下消息:
RE-CHECKING DEPENDENCIES
------------------------
error: A required dependency 'pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))' is still missing.
error: Installation cannot continue without this dependency.
error: Please manually install this dependency and re-run this installer.
我也想分享结果的pip3 search pyqt5
。我不知道我应该安装什么。
此外,我无法安装可选依赖项:
Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
Running 'sudo apt-get install --assume-yes python-notify'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
Running 'sudo apt-get install --assume-yes python-reportlab'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
更让我困惑的是,我在全新安装时也收到同样的错误Ubuntu Studio 20.04
。这让我怀疑它是否hplip-3.20.6.run
已经过测试和调整,可用于最新的 Ubuntu LTS 版本。
我编辑了我的/etc/apt/sources.list和ca.archive.ubuntu.com变得存档.ubuntu.com。
命令sudo apt-get 更新 && sudo apt-get 升级刷新时没有任何错误,也没有任何软件更新。
当我到达依赖与冲突解决介入;涉足hplip-3.20.6.run
Running 'sudo apt-get install --assume-yes python-pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
Running 'sudo apt-get install --assume-yes python-notify'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
Running 'sudo apt-get install --assume-yes python-reportlab'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
剧本的结尾是
RE-CHECKING DEPENDENCIES
------------------------
error: A required dependency 'pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))' is still missing.
error: Installation cannot continue without this dependency.
error: Please manually install this dependency and re-run this installer.
我使用的原因sudo ./hplip-3.20.6.run
是由于600 多个权限相关错误造成无须藤
使用hp-setup
让我回到上面描述的错误:
rpiggott@rpiggott-Aspire-5742Z:~/Downloads$ hp-setup
Command 'hp-setup' not found, but can be installed with:
sudo apt install hplip
rpiggott@rpiggott-Aspire-5742Z:~/Downloads$ sudo apt install hplip
[sudo] password for rpiggott:
Reading package lists... Done
Building dependency tree
Reading state information... Done
hplip is already the newest version (3.20.3+dfsg0-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
尝试去卸载并重新安装给我留下了错误
Can't open /etc/hp/hplip.conf: No such file or directory.
答案1
无法安装我的根本原因HP LaserJet 1012打印机是使用二进制而不是 Ubuntu 提供的内容。
步骤 1:从二进制文件中清除现有 HP 软件
sudo apt-get purge hplip hplip-data hplip-doc hplip-gui hpijs-ppds libsane-hpaio printer-driver-hpcups printer-driver-hpijs
步骤 2:删除目录(如果存在)
sudo rm -rf /usr/share/hplip/
步骤 3:删除不再需要的包
sudo apt-get autoremove
步骤 4:安装 HP 图形用户界面:
sudo apt-get install hplip-gui
步骤5:使用Ubuntu 20.04图形界面本地HP LIP工具并按照提示添加您的HP打印机。
此答案基于先前的询问 Ubuntu邮政。