在 Ubuntu 里常说的 spool 出错,大多数情况是指 打印队列(CUPS print spool) 或 邮件/任务 spool(/var/spool) 出了问题。下面按常见场景给你排查和处理方法。
systemctl status cups
如果没运行:
sudo systemctl start cups
sudo systemctl enable cups
sudo systemctl stop cups
sudo rm -rf /var/spool/cups/*
sudo systemctl start cups
lpstat -o
cancel -a
sudo chown -R root:lp /var/spool/cups
sudo chmod 755 /var/spool/cups
/var/spool 相关错误df -h
如果 /var 满了:
sudo journalctl --vacuum-size=100M
sudo apt autoremove
sudo rm -f /var/spool/mail/*
或
sudo rm -f /var/mail/*
例如:
/var/spool/apt/...
修复:
sudo apt clean
sudo apt update
sudo dpkg --configure -a
sudo systemctl stop cups
sudo rm -rf /var/spool/cups/*
sudo systemctl start cups
sudo apt update
你可以把具体报错信息贴出来,比如:
我可以直接告诉你哪一行导致的、怎么修最安全。