web-dev-qa-db-fra.com

erreur de compilation sa-compile

J'ai un problème avec la dernière mise à jour pour sa-compile (paquet 3.4.0-1ubuntu2) sur Ubuntu 14.04. Lorsque j'installe le paquet, j'obtiens le message d'erreur suivant:

.sa-compile (3.4.0-1ubuntu2) wird eingerichtet ...
Running sa-compile (may take a long time)
cannot create ./.spamassassin785yZpOYGtmp/log: No such file or directory at /usr/bin/sa-compile line 278.
dpkg: Fehler beim Bearbeiten des Paketes sa-compile (--configure):
Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
Fehler traten auf beim Bearbeiten von:
sa-compile
E: Sub-process /usr/bin/dpkg returned an error code (1)

J'ai mis à jour le serveur à partir de 12.04 il y a quelque temps et j'ai trouvé plusieurs entrées qui posaient problème. Quoi qu'il en soit, ils ont tous proposé une erreur et une solution différentes.

MAIS si je viens de lancer la version installée, il semble bien fonctionner

user@server:~$ Sudo sa-compile
Dez 11 13:25:25.754 [811] info: generic: base extraction starting. this can take a while...
Dez 11 13:25:25.754 [811] info: generic: extracting from rules of type body_0
100% [==========================================================================================================================================================================================================================================] 11981.38 rules/sec 00m00s DONE
100% [==========================================================================================================================================================================================================================================] 460.86 bases/sec 00m05s DONE
Dez 11 13:25:30.898 [811] info: body_0: 1093 base strings extracted in 5 seconds
cd /tmp/.spamassassin8118OPCdetmp
reading bases_body_0.in
cd Mail-SpamAssassin-CompiledRegexps-body_0
re2c -i -b -o scanner1.c scanner1.re
re2c -i -b -o scanner2.c scanner2.re
re2c -i -b -o scanner3.c scanner3.re
re2c -i -b -o scanner4.c scanner4.re
re2c -i -b -o scanner5.c scanner5.re
re2c -i -b -o scanner6.c scanner6.re
/usr/bin/Perl Makefile.PL PREFIX=/tmp/.spamassassin8118OPCdetmp/ignored INSTALLSITEARCH=/var/lib/spamassassin/compiled/5.018/3.004000 
Writing Makefile for Mail::SpamAssassin::CompiledRegexps::body_0
Writing MYMETA.yml and MYMETA.json
make 
cp body_0.pm blib/lib/Mail/SpamAssassin/CompiledRegexps/body_0.pm
/usr/bin/Perl /usr/share/Perl/5.18/ExtUtils/xsubpp  -typemap /usr/share/Perl/5.18/ExtUtils/typemap  body_0.xs > body_0.xsc && mv body_0.xsc body_0.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC "-I/usr/lib/Perl/5.18/CORE"   body_0.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC "-I/usr/lib/Perl/5.18/CORE"   scanner1.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC "-I/usr/lib/Perl/5.18/CORE"   scanner2.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC "-I/usr/lib/Perl/5.18/CORE"   scanner3.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC "-I/usr/lib/Perl/5.18/CORE"   scanner4.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC "-I/usr/lib/Perl/5.18/CORE"   scanner5.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC "-I/usr/lib/Perl/5.18/CORE"   scanner6.c
Running Mkbootstrap for Mail::SpamAssassin::CompiledRegexps::body_0 ()
chmod 644 body_0.bs
rm -f blib/Arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so
cc  -shared -L/usr/local/lib -fstack-protector body_0.o scanner1.o scanner2.o scanner3.o scanner4.o scanner5.o scanner6.o  -o blib/Arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so     \
        \

chmod 755 blib/Arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so
cp body_0.bs blib/Arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.bs
chmod 644 blib/Arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.bs
Manifying blib/man3/Mail::SpamAssassin::CompiledRegexps::body_0.3pm
make install 
Files found in blib/Arch: installing files in blib/lib into architecture dependent library tree
Installing /var/lib/spamassassin/compiled/5.018/3.004000/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.bs
Installing /var/lib/spamassassin/compiled/5.018/3.004000/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so
Installing /var/lib/spamassassin/compiled/5.018/3.004000/Mail/SpamAssassin/CompiledRegexps/body_0.pm
Installing /tmp/.spamassassin8118OPCdetmp/ignored/man/man3/Mail::SpamAssassin::CompiledRegexps::body_0.3pm
Appending installation info to /var/lib/spamassassin/compiled/5.018/3.004000/perllocal.pod
cp /tmp/.spamassassin8118OPCdetmp/bases_body_0.pl /var/lib/spamassassin/compiled/5.018/3.004000/bases_body_0.pl
cd /
rm -rf /tmp/.spamassassin8118OPCdetmp
2
smiddy84

Il suffit de modifier le fichier /usr/bin/sa-compile

À la ligne 278 add

  mkdir "$dirpath", 755;

pour qu'il ressemble

  $log = ">>$dirpath/log";
  # empty it
  mkdir "$dirpath", 755;
  open(ZERO, ">$dirpath/log")  or die "cannot create $dirpath/log: $!";

puis essayez de réinstaller sa-compile

1
hsc