linux - CUPS 2.0 lpstat 和 lpinfo 命令返回 "Bad file descriptor"

标签 linux printing cups

<分区>

我已经在我的 Ubuntu 机器上安装了 cups 2.0。我是从源码安装的。当我在 CUPS manual 中键入前几个命令时它返回消息 Bad file descriptor。这是一个例子

VPCZ12V9E:~$ sudo lpinfo -m
lpinfo: Bad file descriptor
VPCZ12V9E:~$ lpstat -p
lpstat: Bad file descriptor

请说明为什么会这样?这对我来说意味着我有问题。我还没有尝试添加打印机。我只安装了 CUPS 2.0。

最佳答案

还要确保您已经开始 Cupsd 服务

根据 ArchWiki ( https://wiki.archlinux.org/index.php/CUPS ),该服务称为:org.cups.cupsd.service

通过以下方式检查服务:sudo systemctl status org.cups.cupsd.service

通过以下方式启动(如果未启动)服务:sudo systemctl start org.cups.cupsd.service

通过以下方式启用服务(如果未启用):sudo systemctl enable org.cups.cupsd.service

关于linux - CUPS 2.0 lpstat 和 lpinfo 命令返回 "Bad file descriptor",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26715802/

相关文章:

linux - 如何在 Lua 和 cups 中使用打印机

linux - 在 crontab 中找不到命令转储

linux - 如何从我的 Ansible playbook 检查环境变量?

javascript - 删除消息选择打印机并使用 javascript 自动打印文档

java.lang.NoClassDefFoundError : Could not initialize class sun. 打印.CUPSPrinter

linux - cupsenable cups禁用

java - 如何使用java在linux上编写Syslog

c - 提高 OpenMP 程序的性能

php - 直接从 (zebra) 打印机上的浏览器打印贴纸/条形码标签

python - 为什么 print() 在 Visual Studio Code 中不起作用?