Ticket #393 (new defect)

Opened 3 years ago

Last modified 13 months ago

warn: FuzzyOcr: Return code: 512, Error: ocrad: bad magic number - not a pbm or pgm file

Reported by: flensburg Owned by: decoder
Priority: major Milestone:
Component: Image Analysis Version: 3.5.1
Keywords: warn: FuzzyOcr: Return code: 512, Error: ocrad: bad magic number - not a pbm or pgm file. Cc:

Description

I installed FuzzyOcr? on my Ubuntu 6.10 with Mailscanner and Spamassassin using this guide:  http://www.howtoforge.com/fight_image_spam_with_fuzzyocr_spamassassin.

After a few hours of trailing the logs and patching the scanset and pref files due to old netpbm using this guide:  http://www200.pair.com/mecham/spam/image_spam2.html (under "If you are using netpbm < 10.34 (Debian uses 10.0-10.1)..." and "Those programs are used together; therefore we need to disable any scansets that use them..."), I still have a few error messages I don't understand. It look like this in the log:

[3750] warn: FuzzyOcr?: Errors in Scanset "ocrad" [3750] warn: FuzzyOcr?: Return code: 512, Error: ocrad: bad magic number - not a pbm or pgm file. [3750] warn: FuzzyOcr?: Skipping scanset because of errors, trying next...

[...] and...

[3750] warn: FuzzyOcr?: Errors in Scanset "ocrad-invert" [3750] warn: FuzzyOcr?: Return code: 512, Error: ocrad: bad magic number - not a pbm or pgm file. [3750] warn: FuzzyOcr?: Skipping scanset because of errors, trying next...

I'm lost! Please help!

Change History

  Changed 3 years ago by flensburg

I think it's fixed!!

I tried a newer ocrad package that is originally build for Ubuntu 7.10:

wget  http://librarian.launchpad.net/5030013/ocrad_0.16-1_i386.deb

Installed it with:

dpkg -i ocrad_0.16-1_i386.deb

The output was: dpkg: dependency problems prevent configuration of ocrad:

ocrad depends on libc6 (>= 2.5-0ubuntu1); however:

Version of libc6 on system is 2.4-1ubuntu12.3.

ocrad depends on libgcc1 (>= 1:4.1.1-17ubuntu1); however:

Version of libgcc1 on system is 1:4.1.1-13ubuntu5.

ocrad depends on libstdc++6 (>= 4.1.1-17ubuntu1); however:

Version of libstdc++6 on system is 4.1.1-13ubuntu5.

dpkg: error processing ocrad (--install):

dependency problems - leaving unconfigured

Errors were encountered while processing:

ocrad

I tried the sample mails again with:

spamassassin --debug FuzzyOcr? < ocr-gif.eml > /dev/null

and to my surprise - no more warnings about ocrad scanset!!! Instead: [4566] info: FuzzyOcr?: Scanset "ocrad" generates enough hits (8), skipping further scansets...

I really don't know if I can trust that everything will work, but it looks ok!

follow-up: ↓ 5   Changed 3 years ago by flensburg

The above solution is not recommended, because it leaves unresolved dependencies hanging in apt-get. You will not be able to install anything new until you resolved this.

I tried a different solution. I guessed FuzzyOcr? only uses the bin-file (?) so I just replaced the old ocrad bin-file (0.13) with the new one (0.16) (/usr/bin/ocrad) and changed the permissions.

-rwxr-xr-x 1 root root 254820 2006-11-10 00:32 ocrad -rwxr-xr-x 1 root root 230468 2005-10-29 00:54 ocrad.old

root@mailgw:/usr/bin# ocrad --version GNU Ocrad version 0.16

Looks ok!?

in reply to: ↑ 2 ; follow-up: ↓ 6   Changed 3 years ago by vbruchem@…

so but this doesn't work.. I replaced the ocrad file in my /usr/bin dir and still ocrad doesn't append the output file with the new input :(

Replying to flensburg:

The above solution is not recommended, because it leaves unresolved dependencies hanging in apt-get. You will not be able to install anything new until you resolved this. I tried a different solution. I guessed FuzzyOcr? only uses the bin-file (?) so I just replaced the old ocrad bin-file (0.13) with the new one (0.16) (/usr/bin/ocrad) and changed the permissions. -rwxr-xr-x 1 root root 254820 2006-11-10 00:32 ocrad -rwxr-xr-x 1 root root 230468 2005-10-29 00:54 ocrad.old root@mailgw:/usr/bin# ocrad --version GNU Ocrad version 0.16 Looks ok!?

in reply to: ↑ 5   Changed 3 years ago by vbruchem

That doesn't work but there's the command 'cat file1 file2 > file3' that will join the files.

Replying to vbruchem@gmail.com:

so but this doesn't work.. I replaced the ocrad file in my /usr/bin dir and still ocrad doesn't append the output file with the new input :( Replying to flensburg:

The above solution is not recommended, because it leaves unresolved dependencies hanging in apt-get. You will not be able to install anything new until you resolved this. I tried a different solution. I guessed FuzzyOcr? only uses the bin-file (?) so I just replaced the old ocrad bin-file (0.13) with the new one (0.16) (/usr/bin/ocrad) and changed the permissions. -rwxr-xr-x 1 root root 254820 2006-11-10 00:32 ocrad -rwxr-xr-x 1 root root 230468 2005-10-29 00:54 ocrad.old root@mailgw:/usr/bin# ocrad --version GNU Ocrad version 0.16 Looks ok!?

Note: See TracTickets for help on using tickets.