我在Ubuntu18.04仿生海狸上安装了像这样的杯子
$ sudo apt-get update
$ sudo apt-get install cups我检查了杯子的状态,结果没有启动。
$ systemctl status cups
● cups.service - CUPS Scheduler
Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-09-10 16:29:40 EDT; 3s ago
Docs: man:cupsd(8)
Process: 2895 ExecStart=/usr/sbin/cupsd -l (code=exited, status=1/FAILURE)
Main PID: 2895 (code=exited, status=1/FAILURE)
Sep 10 16:29:40 chrisni-X456UJ systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Sep 10 16:29:40 chrisni-X456UJ systemd[1]: cups.service: Scheduled restart job, restart counter is at 5.
Sep 10 16:29:40 chrisni-X456UJ systemd[1]: Stopped CUPS Scheduler.
Sep 10 16:29:40 chrisni-X456UJ systemd[1]: cups.service: Start request repeated too quickly.
Sep 10 16:29:40 chrisni-X456UJ systemd[1]: cups.service: Failed with result 'exit-code'.
Sep 10 16:29:40 chrisni-X456UJ systemd[1]: Failed to start CUPS Scheduler.我编辑了cupsd.conf,并将LogLevel从“警告”改为“调试”。我尝试手动启动cups,但是相同的输出重复。
$ systemctl start cups
$ systemctl status cups这是log,显示的块是重复的。
$ grep cups /var/log/syslog
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Failed with result 'exit-code'.
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Scheduled restart job, restart counter is at 1.
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Main process exited, code=exited, status=1/FAILURE
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Failed with result 'exit-code'.
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Scheduled restart job, restart counter is at 2.
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Main process exited, code=exited, status=1/FAILURE
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Failed with result 'exit-code'.
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Sep 10 15:56:36 chrisni-X456UJ systemd[1]: cups.service: Scheduled restart job, restart counter is at 3.
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Main process exited, code=exited, status=1/FAILURE
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Failed with result 'exit-code'.
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Scheduled restart job, restart counter is at 4.
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Main process exited, code=exited, status=1/FAILURE
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Failed with result 'exit-code'.
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Scheduled restart job, restart counter is at 5.
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Start request repeated too quickly.
Sep 10 15:56:37 chrisni-X456UJ systemd[1]: cups.service: Failed with result 'exit-code'.
Sep 10 16:02:15 chrisni-X456UJ systemd[1]: cups.service: Main process exited, code=exited, status=1/FAILURE有谁知道我怎么开始杯子的吗?
发布于 2020-07-14 14:50:46
看看/var/log/cups/error_log的尾部:
X [14/Jul/2020:15:06:38 +0200] No valid Listen or Port lines were found in the configuration file.实际上,配置文件被其他一些设置破坏了,但幸运的是保留了一个备份:
ll /etc/cups/cupsd.conf*
-rw-r----- 1 root 4571 2020-07-01 19:53 /etc/cups/cupsd.conf.O
-rw-r----- 1 root 22 2020-07-01 19:54 /etc/cups/cupsd.conf这为我(在Ubuntu18.04中)恢复cupsd.conf和重新启动cups起了作用:
sudo -i
cd /etc/cups
cp cupsd.conf.O cupsd.conf
systemctl restart cups通过下列方式核实:
systemctl status cups发布于 2021-02-17 01:10:47
我发现了系统未启动的系统错误。所以我搜索错误,然后去了https://linuxhandbook.com/system-has-not-been-booted-with-systemd/。因此,我使用的不是systemctl重启cups,而是使用service cups重新启动。然后使用service cups状态进行检查。一切都很好。
https://askubuntu.com/questions/1074086
复制相似问题