Majorodomo: Can't locate in @INC (TEMPLATES)

Version 1.62.0


Newer versions of perl do not include the current working directory in the @INC list. This is a related error: Can't locate in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /etc/virtual/majordomo/config-test line 129. Note how the @INC list does not end with . after /usr/share/perl5 You can confirm your list with this command: perl -e "print qq(@INC)" if the very last character of output does not show ".", then this fix will be needed. Here's an older box with the trailling, which does not need the fix; [root@es6-64 directadmin]# perl -e "print qq(@INC)" /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . ============== TEMPLATES The fix was to add: use lib '.'; to the top of the: /usr/local/directadmin/data/templates/ and simply issue an edit/save to the mailing list, which will update the file: /etc/virtual/ with the new @INC list, including the trailing dot ("current path"). ============== Another solution (not implemented) was to link the non-found files to the /usr/local/share/perl5 folder: cd /usr/local/share/perl5/ ln -s /etc/virtual/majordomo/ ln -s /etc/virtual/majordomo/ ln -s /etc/virtual/majordomo/ which also appears to work, but is less preferable as it affects all perl scripts on the system, which might end up using a majordomo .pl file if they happen to use the same name. ===== T31180

Interested to try DirectAdmin? Get a 30-day Free Trial!