Eu tive o mesmo erro e resolvi isso instalando o perl-cgi
package
$ sudo pacman -S perl-cgi
N.b, depurei isso executando o script com falha diretamente, ou seja,
$ cd /usr/share/gitweb/
$ ./gitweb.cgi
Can't locate CGI.pm in @INC (you may need to install the CGI module)(@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at ./gitweb.cgi line 13.
BEGIN failed--compilation aborted at ./gitweb.cgi line 13.