I have installed cups 2.0 on my Ubuntu box. I installed from source. When I type the first few commands in the CUPS manual it returns the message Bad file descriptor. Here is an example
VPCZ12V9E:~$ sudo lpinfo -m
lpinfo: Bad file descriptor
VPCZ12V9E:~$ lpstat -p
lpstat: Bad file descriptor
Please suggest why this is happening? It implies to me that I have a problem. I have not tried adding a printer yet. I have only installed CUPS 2.0.
Ensure also you have Started Cupsd Service
According to the ArchWiki (https://wiki.archlinux.org/index.php/CUPS), the service is called: org.cups.cupsd.service
Check the service by: sudo systemctl status org.cups.cupsd.service
Start (if not started) the service by: sudo systemctl start org.cups.cupsd.service
Enable the service (if not enabled) by: sudo systemctl enable org.cups.cupsd.service