This post applies to Ubuntu 9.04 Server and cupsys v1.3.9-17. It details a quick fix for a problem when adding a printer after a standard apt-get install.
I’ve recently installed CUPS on one of my Ubuntu servers using apt-get:
root@box:~# apt-get install cupsys
Following the documentation over at the CUPS project homepage, I issued the following command to add my stalwart HP LaserJet 6MP (connected to the network by an even older JetDirect 500X):
root@box:~# lpadmin -p LaserJet -E -v socket://192.168.x.110 -m laserjet.ppd
lpadmin: Unable to copy PPD file!
root@box:~#
A quick check of the logs (/var/log/cups/error_log) revealed:
E [20/Aug/2009:21:42:01 +0100] [cups-driverd] Unable to open “/usr/share/cups/model/laserjet.ppd” – No such file or directory
So, simple fix – find where laserjet.ppd is hiding and copy it to that directory:
root@box:~# find / -iname laserjet.ppd
/usr/share/ppd/cups-included/HP/laserjet.ppd
root@box:~# cp /usr/share/ppd/cups-included/HP/laserjet.ppd /usr/share/cups/model
And hey presto, CUPS works – that’ll hopefully save someone five minutes of digging!