There are various reason to have messages like The error was:
Mailman CGI error!!!
This entry is being stored in your syslog:

Failure to exec script. WANTED gid 502, GOT gid 48.  (Reconfigure to take 48?)

Below are possible solutions


WANTED gid 502, got 48

In October, 2012, the error was:
Mailman CGI error!!!
This entry is being stored in your syslog:

Failure to exec script. WANTED gid 502, GOT gid 48.  (Reconfigure to take 48?)

In Installing Mailman said:

./configure --with-cgi-gid=48
gid 502 is www.
gif 48 is apache

However, rebuilding with --with-cgi-gid=48 does not solve the problem.

Using suexec

https://www.redhat.com/support/resources/faqs/RH-apache-FAQ/misc/suexec.html

Verify that /usr/sbin/suexec has permissions set to 4711. When these are properly set you will see something like this in your error log at startup: [Sun Oct 3 03:56:39 1999] [notice] Red Hat Secure/3.0 (Unix) DAV/0.9.8 mod_perl/1.19 PHP/3.0.9 configured -- resuming normal operations [Sun Oct 3 03:56:39 1999] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
Indeed, after I did
chmod 4711 /usr/sbin/suexec
/etc/init.d/httpd restart
then /usr/local/apache/logs/error_log had:
[Tue Oct 16 14:10:40 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

See https://httpd.apache.org/docs/2.2/suexec.html

In the end, the issue was that:

Not using suexec

suexec above seems really wrong, can we just use the apache gid/uid and not use Suexec?

WANTED gid 48, got 412

See What do I change after changing the uid or gid?

In May, 2014, after changing from apache uid to webuser uid, we started to get:

Mailman CGI error!!!
This entry is being stored in your syslog:

Failure to exec script. WANTED gid 48, GOT gid 412.  (Reconfigure to take 412?)

After reviewing the above, the thing to do seemed to be to rebuild the setguid files in cgi-bin, see /home/www/php/mailman/fixmailman.