0

While installing some software on my Debian 10.9 server, I received this error:

$ sudo apt-get install fail2ban

... [cut]

Running sa-compile (may take a long time)
command 're2c -i -b -o scanner1.c scanner1.re' failed: exit 0
dpkg: error processing package sa-compile (--configure):
 installed sa-compile package post-installation script subprocess returned error exit status 12
Setting up fail2ban (0.10.2-2.1)...

... [cut]

Errors were encountered while processing:
 sa-compile
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have previously installed spamassassin (sa-compile's dependent). This confused me, so I tried to dpkg-reconfigure:

$ sudo dpkg-reconfigure sa-compile
/usr/sbin/dpkg-reconfigure: sa-compile is broken or not fully installed

Installing the package with --reinstall is a no-op. Using --fix-broken instead returns a familiar error:

$ sudo apt-get install --fix-broken sa-compile
Setting up sa-compile (3.4.2-1+deb10u3) ...
Running sa-compile (may take a long time)
command 're2c -i -b -o scanner1.c scanner1.re' failed: exit 0
dpkg: error processing package sa-compile (--configure):
 installed sa-compile package post-installation script subprocess returned error exit status 12
Errors were encountered while processing:
 sa-compile
E: Sub-process /usr/bin/dpkg returned an error code (1)

How do I go about fixing this?

1 Answers1

0

Exit code 12 is normally ENOMEM (if it's not wropped somewhere), so I guess you have simply not enough memory to fulfill compilation of sa. Try to stop something (leaking memory or eating large memory amount) firstly or maybe restart it or reboot the whole host and then try again.

sebres
  • 260
  • 1
  • 4