Unable to install Brother DCP-145C drivers

Issues Related to Hardware (Sound, Video, Printers, Scanners, Webcams, Touchpads, Keyboards, Sensors, Drives, GRUB, etc.)

Moderator: Moderators

maccabbeo
Simple Hen
Posts: 89
Joined: Sun May 11, 2014 16:57

Unable to install Brother DCP-145C drivers

Post by maccabbeo » Wed May 21, 2014 11:41

Hi to all,

here there are the drivers for my printer, but I don't know how to install them since they are only provided as .rpm and .deb

http://support.brother.com/g/b/download ... 145c_eu_as

Of course, I tried connecting the printer to my laptop through USB and Sabayon has not been able to find/install the drivers by itself.
What should I do?
Thanks,
regards.

svantoviit
Old Dear Hen
Posts: 730
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: Unable to install Brother DCP-145C drivers

Post by svantoviit » Wed May 21, 2014 16:53

I would try to adapt the 185 ebuilds from the flow overlay http://gpo.zugaina.org/Search?search=net-print/brother to be kosher.
Edit: Actually there are corresponding ebuilds in Gentoo Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=316877
Use them or submit a package request.

But actually it would be enough to download the rpms, extract them and put the files into the respective folders and eventually adjust ownership and permissions.

You could even install the rpms with rpm directly

Code: Select all

# rpm -i --nodeps PACKAGE

maccabbeo
Simple Hen
Posts: 89
Joined: Sun May 11, 2014 16:57

Re: Unable to install Brother DCP-145C drivers

Post by maccabbeo » Mon May 26, 2014 10:12

I get the following errors while installing the drivers using the installer provided by Brother:

Code: Select all

chown: impossibile accedere a "/var/spool/lpd/dcp145c": File o directory non esistente
chgrp: impossibile accedere a "/var/spool/lpd/dcp145c": File o directory non esistente
chmod: impossibile accedere a "/var/spool/lpd/dcp145c": File o directory non esistente

Code: Select all

/usr/local/Brother/Printer/dcp145c/cupswrapper/cupswrapperdcp145c: line 725: /usr/lib64/cups/filter/brlpdwrapperdcp145c: File o directory non esistente
chmod: impossibile accedere a "/usr/lib64/cups/filter/brlpdwrapperdcp145c": File o directory non esistente
#
here it is the whole output of the installation script, omitting the licence agreement terms: http://pastebin.sabayon.org/pastie/16844

maccabbeo
Simple Hen
Posts: 89
Joined: Sun May 11, 2014 16:57

Re: Unable to install Brother DCP-145C drivers

Post by maccabbeo » Mon May 26, 2014 10:22

Actually I've not been following the instructions reported here: http://support.brother.com/g/b/download ... &type3=625

So the above result comes from running

Code: Select all

sudo sh linux-brprinter-installer-2.0.0-1
instead.

Now this is the result of running the installer as reported in the install instructions

Code: Select all

su
Password: 
manolosabayon Scaricati # bash linux-brprinter-installer-2.0.0-1
Input model name ->dcp145-c

You are going to install following packages.
   dcp145clpr-1.1.2-2.i386.rpm
   dcp145ccupswrapper-1.1.2-2.i386.rpm
   brscan3-0.2.11-5.x86_64.rpm
   brscan-skey-0.2.4-1.x86_64.rpm
OK? [y/N] ->y

rpm -ihv --nodeps --replacefiles --replacepkgs dcp145clpr-1.1.2-2.i386.rpm
Preparazione in corso...              ################################# [100%]
Aggiornamento / installazinone...
   1:dcp145clpr-1.1.2-2               ################################# [100%]
mkdir: impossibile creare la directory "/var/spool/lpd/dcp145c": File o directory non esistente
chown: impossibile accedere a "/var/spool/lpd/dcp145c": File o directory non esistente
chgrp: impossibile accedere a "/var/spool/lpd/dcp145c": File o directory non esistente
chmod: impossibile accedere a "/var/spool/lpd/dcp145c": File o directory non esistente
rpm -ihv --nodeps --replacefiles --replacepkgs dcp145ccupswrapper-1.1.2-2.i386.rpm
Preparazione in corso...              ########################################
Aggiornamento / installazinone...
dcp145ccupswrapper-1.1.2-2            ########################################
/usr/local/Brother/Printer/dcp145c/cupswrapper/cupswrapperdcp145c: line 725: /usr/lib64/cups/filter/brlpdwrapperdcp145c: File o directory non esistente
chmod: impossibile accedere a "/usr/lib64/cups/filter/brlpdwrapperdcp145c": File o directory non esistente
#
Will you specify the Device URI? [Y/n] ->n

Test Print? [y/N] ->y

wait 5s.
lpr -P DCP145C /usr/share/cups/data/testprint
You are going to install following packages.
   brscan3-0.2.11-5.x86_64.rpm
rpm -ihv --nodeps --replacefiles --replacepkgs brscan3-0.2.11-5.x86_64.rpm
Preparazione in corso...              ################################# [100%]
Aggiornamento / installazinone...
   1:brscan3-0.2.11-5                 ################################# [100%]
You are going to install following packages.
   brscan-skey-0.2.4-1.x86_64.rpm
rpm -ihv --nodeps --replacefiles --replacepkgs brscan-skey-0.2.4-1.x86_64.rpm
Preparazione in corso...              ################################# [100%]
Aggiornamento / installazinone...
   1:brscan-skey-0.2.4-1              ################################# [100%]
ln: creazione del collegamento simbolico "/etc/opt/brother/scanner/brscan-skey/brscan_mail.config" non riuscita: File già esistente
ln: creazione del collegamento simbolico "/etc/opt/brother/scanner/brscan-skey/brscan_mailmessage.txt" non riuscita: File già esistente
ln: creazione del collegamento simbolico "/etc/opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0.cfg" non riuscita: File già esistente
ln: creazione del collegamento simbolico "/usr/bin/brscan-skey" non riuscita: File già esistente
avvertimento: scriptlet %post(brscan-skey-0.2.4-1.x86_64) fallita, uscita con stato 1
Hit Enter/Return key.

I'm not able to print a test page anyway. The printer is listed into the printer settings even if it has a red exclamation mark on the printer icon, indicating there's something wrong with the printer. What? How to solve it? Thanks.

PD: is there any difference into running a command as "sudo" or after "su" ? Which one? Also, is there any difference in running a script as "sh" or as "bash" ? Thanks, regards.

svantoviit
Old Dear Hen
Posts: 730
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: Unable to install Brother DCP-145C drivers

Post by svantoviit » Tue May 27, 2014 14:44

maccabbeo wrote:So the above result comes from running

Code: Select all

sudo sh linux-brprinter-installer-2.0.0-1
instead.
The preferred way of installing any software on Sabayon is via a package manager.
maccabbeo wrote:is there any difference into running a command as "sudo" or after "su" ?
More info on this see: Re: equo : why sudo should not be use ? and the message by the devs on #sabayon:

Code: Select all

00:00 ParkerBeta | [0] sudo: Even though sudo is present on sabayon, we don't
                 | advise using it. Many of our howtos contain chained commands,
                 | which sudo will only execute the first portion of with root
                 | privileges. Please use su instead. If you really want to do  
                 | things the stupid way, then here's how. http://wiki.sabayonli
                 | nux.org/index.php?title=HOWTO:_Enable_sudo
00:00 ParkerBeta | [1] sudo: it is also proven that sudo does not update the
                 | operating environment properly, this can lead to small but
                 | dangerous stability issues at times
00:00 ParkerBeta | [2] sudo: if you don't listen to our sage advice, we will
                 | drop angry hedgehogs, porcupines, or cacti into your
                 | underwear while you're wearing them.
maccabbeo wrote:is there any difference in running a script as "sh" or as "bash" ?
Depends…

Code: Select all

$ which {ba,}sh
/bin/bash
/bin/sh
$ ls -lF /bin/{ba,}sh
-rwxr-xr-x 1 root root 850336 Jan 29 15:48 /bin/bash*
lrwxrwxrwx 1 root root      4 Feb 10 10:12 /bin/sh -> bash*
Here sh is symlinked to bash, so in this case it makes no difference whether you run sh or bash.

maccabbeo
Simple Hen
Posts: 89
Joined: Sun May 11, 2014 16:57

Re: Unable to install Brother DCP-145C drivers

Post by maccabbeo » Tue May 27, 2014 17:44

ok, it is clear. So, you suggest me to install the packages via the package manager. Could you please tell me exactly which command should I use? I'm new to Sabayon/Gentoo.
Thanks

maccabbeo
Simple Hen
Posts: 89
Joined: Sun May 11, 2014 16:57

Re: Unable to install Brother DCP-145C drivers

Post by maccabbeo » Thu May 29, 2014 8:11

Hey svantoviit, any suggestion on how to install through the package manager?
Thanks,
regards.

svantoviit
Old Dear Hen
Posts: 730
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: Unable to install Brother DCP-145C drivers

Post by svantoviit » Thu May 29, 2014 9:13

Can't go through it step by step explicitly.
  1. Create a local portage overlay.
    Ref.: The Complete Portage Guide, Safely mix Entropy and Portage, Overlay/Local overlay - Gentoo Wiki.
  2. Download the ebuilds from gentoo bugzilla (assuming the location of the local overlay is /usr/local/portage/):

    Code: Select all

    mkdir -p /usr/local/portage/net-print/brother-DCP-145C-lpr
    mkdir -p /usr/local/portage/net-print/brother-DCP-145C-cupswrapper/files

    Code: Select all

    cd /usr/local/portage/net-print
    wget https://bugs.gentoo.org/attachment.cgi?id=228959 -O brother-DCP-145C-lpr/brother-DCP-145C-lpr-1.1.2.2.ebuild

    Code: Select all

    wget https://bugs.gentoo.org/attachment.cgi?id=228955 -O brother-DCP-145C-cupswrapper/brother-DCP-145C-cupswrapper-1.1.2.2.ebuild
    wget https://bugs.gentoo.org/attachment.cgi?id=228957 -O brother-DCP-145C-cupswrapper/files/adjust_servicies_link.patch
    If you are on a 64bit system, you'll probably need to change the keywords line in the ebuilds into:

    Code: Select all

    KEYWORDS="~x86 ~amd64"
  3. Create manifests and emerge. Hopefully it wont throw any errors and it will work.
  4. Inform entropy about the installed packages:

    Code: Select all

    equo rescue spmsync
Another option is to make a package request and wait until the packages hit Entropy.
Good luck!

maccabbeo
Simple Hen
Posts: 89
Joined: Sun May 11, 2014 16:57

Re: Unable to install Brother DCP-145C drivers

Post by maccabbeo » Sat May 31, 2014 15:36

Thanks for your reply.
I've been reading the links you sent and it seems the creation of such an overlay is somehow dangerous/complex and discouraged anyway.

On the other hand, AFAICS the link you gave me just reports pages for filing a bug, not how to make a package request. What am I missing?
Thank you so much for your time.
Regards.

EDIT: https://bugs.sabayon.org/show_bug.cgi?id=4724

svantoviit
Old Dear Hen
Posts: 730
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: Unable to install Brother DCP-145C drivers

Post by svantoviit » Sat May 31, 2014 20:57

New → Entropy → Component: Request

See some examples: Summary: package request, Resolution: FIXED, Status: RESOLVED, Product: Entropy

Don't forget to include the link to the ebuilds (Gentoo Bugzilla).

Post Reply