[Pkg-clamav-devel] Bug#799808: clamav: dpkg-configure of clamav fails in finnish locale

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Thu Oct 22 19:40:08 UTC 2015

Control: tags -1 pending

Hi Antti,

On 22.09.2015 23:26, Antti Järvinen wrote:
> when updating clamav to newer version using apt-get the configure-stage 
> fails if LANG is set to fi_FI.UTF-8. Setting LANG to C fixes the problem. 

Thanks for reporting this bug.

> In following output LANG is initially set to fi_FI.UTF-8 so there is 
> some output in finnish, translations follow:
> # nice apt-get -f dist-upgrade
> Setting up clamav-freshclam (0.98.7+dfsg-3) ...
> /var/lib/dpkg/info/clamav-freshclam.config: 136: export: Binääritiedosto: bad variable name
> So in the error message the word "Binääritiedosto" translates to 
> "Binary file" - maybe configure script expects some specific word
> or chokes on accented characters? ..quite possibly as the line 136
> there reads 
>         export "$variable"="true"
> and bash might dislike environment variables with non-ascii names? 

This "Binääritiedosto" comes from grep, because it thinks
/etc/clamav/freshclam.conf is a binary file. Probably there is some
character in there which is invalid in finnish locale.
For the full message from grep, see e.g.:
$ grep ELF /bin/grep
Binääritiedosto /bin/grep täsmää hakuun

Using the '-a' flag of grep avoids this problem:
$ grep -a ELF /bin/grep
ELF<binary data>

Thus I changed clamav's maintainer scripts to use that flag.

> The string seems to originate from variable CLAMAVCONF that in turn
> is propably content of file /etc/clamav/freshclam.conf but in there
> I don't see any accented characters, nor word "Binääritiedosto", it
> is all english and .. judging by the file timestamp, it just got
> overwritten by the upgrade process so I don't even have the original 
> offending content any more. 

Well, it's not all english:

> # Proxy: http://0�:/
> HTTPProxyServer 0�

This is very likely the culprit.
Did you perhaps use packagekit (or a frontend for it) to install clamav?
If so, have a look at bug #777481 [1].

Best regards,

1: https://bugs.debian.org/777481

More information about the Pkg-clamav-devel mailing list