[cups] Brother MFC-J6935DW filter failing. It cannot use Perl modules.

Steve Wanamaker s.wanamaker at sbcglobal.net
Sun Dec 17 16:40:17 PST 2017

I'm trying to get a Brother MFC-J6935DW working.  I'm using Ubuntu 
16.04, fully up to date.  I can print to the printer from Windows 
machines over the network fine.
A test page says that it completed, but nothing happens at the printer.  
Everything else in the log shows that the Linux box is talking to the 

I did some digging in the logs and see this permission denied in the 
filter.  It's Perl is trying to compile the filter, and can't find or 
doesn't have rights to Perl modules.
D [17/Dec/2017:16:03:27 -0800] [Job 1035] PID 8852 
(/usr/lib/cups/filter/pdftopdf) exited with no errors.
D [17/Dec/2017:16:03:27 -0800] [Job 1035] PID 8851 
(/usr/lib/cups/filter/bannertopdf) exited with no errors.
D [17/Dec/2017:16:03:27 -0800] [Job 1035] Can\'t locate Cwd.pm: 
/usr/local/lib/x86_64-linux-gnu/perl/5.22.1/Cwd.pm: Permission denied at 
/opt/brother/Printers/mfcj6935dw//lpd/filter_mfcj6935dw line 8.
D [17/Dec/2017:16:03:27 -0800] [Job 1035] BEGIN failed--compilation 
aborted at /opt/brother/Printers/mfcj6935dw//lpd/filter_mfcj6935dw line 8.
D [17/Dec/2017:16:03:27 -0800] [Job 1035] PID 8853 
(/usr/lib/cups/filter/brother_lpdwrapper_mfcj6935dw) exited with no errors.

I can run perl -c filter_mfcj6935dw and it says syntax OK.
I can run this command and it works:
   root at home2:/opt/brother/Printers/mfcj6935dw/lpd# cat 
/usr/share/ghostscript/9.18/lib/zeroline.ps | ./filter_mfcj6935dw > out.txt

This shows that the filter is working outside of the CUPS environment.

Permissions are 755
-rwxr-xr-x 1 root root 3949384 Feb  5  2017 brmfcj6935dwfilter*
-rwxr-xr-x 1 root root    8040 Feb  5  2017 filter_mfcj6935dw*

The routine that calls the filter is 
It doesn't use any modules.  I edited it and un-commented this: #use Cwd 
'realpath'; and that made that one routine fail.  So none of these Perl 
scripts can load a module when run by CUPS.

What do I need to do to make this work?

Steve Wanamaker

More information about the cups mailing list