Arch Linux - Cannot start CUPS service with systemd

In order to get printing working in Arch Linux, I installed cups, cups-filters, and hplilp (ghostscript and gs-fonts were already installed). However, when I try and make the CUPS service run on startup using:

systemctl enable cups.service

I get this error:

Failed to issue method call: No such file or directory

The same thing happens with cupsd. Is there a package I'm missing that I need to install? Why do I not have a CUPS service?


Solution 1:

Although Hugues Chabot provided a link, the solution from that link came later. So I'll quote the answer which gives an updated and easy solution:

ArchWiki wrote: For cups 2.0.0, the service name has been changed to org.cups.cupsd.service instead of cups.service. This package is available in extra from October 31, 2014. When upgrading to version 2.0.0, it is necessary to manually disable the old service, otherwise broken symbolic links will be left in /etc/systemd/system/ subdirectories and systemd will warn about non-existent services.

So the solution is:

systemctl enable org.cups.cupsd.service 

Solution 2:

First, check if CUPS can be started directly.

systemctl start cups

If this work, check if /usr/lib/systemd/system/cups.socket exists. If not, this is the problem.

Create /etc/systemd/system/cups.socket with the following content.

[Unit]
Description=CUPS Printing Service Sockets

[Socket]
ListenStream=/var/run/cups/cups.sock

[Install]
WantedBy=sockets.target

Then, install CUPS service.

systemctl enable cups

Other possible workarounds can be found at https://bbs.archlinux.org/viewtopic.php?id=146154.