I've got a script to add printers to new computers. I've tested it on a few machines successfully, however it fails on others. The error occurs when using lpadmin to add a printer:
lpadmin -p office -m everywhere -v "ipps://print.my.domain:9164/printers/office"
Which gives ONE of the following errors, it seems to be random which one I get:
lpadmin: Unable to create PPD file: Undefined error: 0 lpadmin: Unable to create PPD file: Interrupted system call
One of the computers it fails on is a freshly installed version of Big Sur 11.6.
Resetting the printing system through System Preferences doesn't help. Adding printers through System Preferences works correctly.
I can't find any information on these errors anywhere, so anything would help.
In my case it appears that newer versions of lpadmin didn't want to play nice with PaperCut Mobility Print printers. I ended up just ignoring Apple's advice and creating a PPD file first. It gives you a couple of warnings about being deprecated but works on all my devices.
For the above example I'd use something like this instead:
/System/Library/Printers/Libraries/ipp2ppd ipps://print.my.domain:9164/printers/office everywhere > /tmp/office.ppd lpadmin -p office -v ipps://print.my.domain:9164/printers/office -P /tmp/office.ppd
Hopefully that helps!