
我在 Windows 10 上使用 Tex Live 和 Strawberry Perl 安裝。舊的回應。然而,此時我正在嘗試使用附加模組來獲取 Perl 程式碼以在perltex
.當嘗試使用模組時perltex
! Package perltex Error: Can't locate Excel/Writer/XLSX.pm in @INC (you may need to
install the Excel::Writer::XLSX module) (@INC contains:
E:/Programmdateien /texlive/2019/tlpkg/tlperl/lib
E:/programmdateien/texlive/2019/tlpkg/tlperl/site/lib
E:/programmdateien/texlive/2019/tlpkg/tlperl/lib) BEGIN failed--compilation
aborted at (eval 13) line 6.
(perltex) .
模組確實安裝正確。我知道這一點是因為我可以很好地運行 Perl 程式碼並獲得所需的結果。僅當嘗試使用 進行建置時才會出現此問題perltex
。
答案1
新增至本地texmf.cnf
TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 1
來自 texmf.cnf 文件:
% This variable is specific to Windows. It must be set to 0 or 1. The
% default is 0. Setting it to 1 tells the Windows script wrappers to
% use an already installed Perl interpreter if one is found on the
% search path, in preference to the Perl shipped with TeX Live. Thus,
% it may be useful if you both (a) installed a full Perl distribution
% for general use, and (b) need to run Perl programs from TL that use
% additional modules we don't provide. The TL Perl does provide all the
% standard Perl modules.