我正在使用 Linux Mint 20.1,尝试通过 WiFi 网络连接到我的打印机。我找到了从终端安装 CUPS 并创建打印机接口的说明。但是,当我尝试使用此打印机从 CUPS 打印测试页时,出现错误“无法找到打印机“877725000000.local”。”我也无法直接打印任何文档。当从 Windows 计算机访问时,打印机已打开并可以工作。
我发现以下问题似乎相似。
https://askubuntu.com/questions/1187966/cups-cant-add-printer-unable-to-locate-printer-web-interface
但是我不明白给出的答案。我不是管理员,也不知道 Linux 的后端是如何工作的(只是在我的个人电脑上使用 Mint 来坚持开源的东西,所以我真的没有接受过任何关于如何使用这些东西的培训)。通过CUPS我找到了配置文件:
LogLevel warn
PageLogFormat
MaxLogSize 0
Listen localhost:631
Listen /run/cups/cups.sock
Browsing Off
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes
<Location />
Order allow,deny
</Location>
<Location /admin>
Order allow,deny
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
</Location>
<Location /admin/log>
AuthType Default
Require user @SYSTEM
Order allow,deny
</Location>
<Policy default>
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
<Limit Create-Job Print-Job Print-URI Validate-Job>
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
<Policy authenticated>
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Default
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
<Policy kerberos>
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Negotiate
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Negotiate
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Negotiate
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
这似乎是打印输出的有用部分> avahi-browse --all -t -r
。
+ enp0s31f6 IPv4 Canon MG7100 series Web Site local
+ enp0s31f6 IPv4 Canon MG7100 series _canon-bjnp1._tcp local
+ enp0s31f6 IPv4 Canon MG7100 series _scanner._tcp local
= enp0s31f6 IPv4 Canon MG7100 series UNIX Printer local
hostname = [877725000000.local]
address = [###hidden###]
port = [515]
txt = ["Fax=F" "Scan=T" "Duplex=T" "Color=T" "UUID=00000000-0000-1000-8000-F48139877725" "mac=F4:81:39:87:77:25" "usb_MDL=MG7100 series" "usb_MFG=Canon" "adminurl=http://877725000000.local." "note=" "pdl=application/octet-stream" "product=(Canon MG7100 series)" "ty=Canon MG7100 series" "priority=60" "qtotal=1" "rp=auto" "txtvers=1"]
= enp0s31f6 IPv4 Canon MG7100 series Internet Printer local
hostname = [877725000000.local]
address = [###hidden###]
port = [631]
txt = ["print-wfds=T" "PaperMax=legal-A4" "kind=document,envelope,photo" "Fax=F" "Scan=T" "Duplex=T" "Color=T" "UUID=00000000-0000-1000-8000-F48139877725" "mac=F4:81:39:87:77:25" "URF=V1.4,CP1,PQ4-5,RS600,SRGB24,W8,OB9,OFU0,DM3,IS20-21" "usb_CMD=URF" "usb_MDL=MG7100 series" "usb_MFG=Canon" "adminurl=http://877725000000.local./index.html?PAGE_AAP" "note=" "pdl=application/octet-stream,image/urf,image/jpeg,image/pwg-raster" "product=(Canon MG7100 series)" "ty=Canon MG7100 series" "priority=15" "qtotal=1" "rp=ipp/print" "txtvers=1"]
= enp0s31f6 IPv4 Canon MG7100 series Web Site local
hostname = [877725000000.local]
address = [###hidden###]
port = [80]
txt = ["mac=F4:81:39:87:77:25" "txtvers=1"]
= enp0s31f6 IPv4 Canon MG7100 series _canon-bjnp1._tcp local
hostname = [877725000000.local]
address = [###hidden###]
port = [8611]
txt = ["mac=F4:81:39:87:77:25" "note=" "priority=20" "txtvers=1"]
= enp0s31f6 IPv4 Canon MG7100 series _scanner._tcp local
hostname = [877725000000.local]
address = [###hidden###]
port = [8612]
txt = ["scannerAvailable=1" "UUID=00000000-0000-1000-8000-F48139877725" "mac=F4:81:39:87:77:25" "mdl=MG7100 series" "mfg=Canon" "adminurl=http://877725000000.local." "ty=Canon MG7100 series" "txtvers=1"]
以下是 CUPS 的屏幕截图。
答案1
Arch 用户在这里,我添加此响应以防有人发现它有用(即使您不使用 arch),因为我花了一段时间才找到解决方案。所以:
- 使用包管理器安装 nss-mdns
- 启动/重启 avahi-daemon.service
- 将 /etc/nsswitch.conf 中的主机行替换为主机: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns
这为我解决了这个问题!
答案2
我看了一下https://openprinting.org/printers,并且找不到列出的打印机型号。虽然这不是死刑,但这通常不是一个好兆头。我猜你需要一个 Linux 驱动程序。
我在以下位置找到了可能的司机https://th.canon/en/support/0100551102。
我不知道这是否有帮助,但值得一试。
您没有说明您使用的是什么发行版,但如果它不是使用 rpm 软件包的发行版,您可以安装该alien
命令,该命令可以将软件包转换为其他格式,例如 Debian deb 格式。然后sudo dpkg -i converted-file-name.deb
,如果它是 deb,您可以使用该命令安装它,并且为了更好地衡量,sudo apt-get install -f
之后运行以查找并希望清理直接安装软件包引起的任何依赖项或其他问题。