我的问题之前已经有人问过,但是答案对我来说不起作用:TeXLive getnonfreefonts-sys 错误:来自 tug.org 的不受信任的证书
脚本 getnonfreefonts 无法安装字体,我得到:
--2021-11-06 14:47:39-- https://www.tug.org/~kotucha/getnonfreefonts/getfont.pl Resolving www.tug.org... 94.23.251.76 Connecting to www.tug.org|94.23.251.76|:443... connected. ERROR: The certificate of 'www.tug.org' is not trusted. ERROR: The certificate of 'www.tug.org' has expired. ! Error: Can't execute wget. C:\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 5:
如果我在脚本代码中将 https 更改为 http,则会得到
Connecting to www.tug.org|94.23.251.76|:80... connected. HTTP request sent, awaiting response... 302 Found Location: https://tug.org/~kotucha/getnonfreefonts/getfont.pl [following] --2021-11-06 17:55:04-- https://tug.org/~kotucha/getnonfreefonts/getfont.pl Resolving tug.org... 94.23.251.76 Connecting to tug.org|94.23.251.76|:443... connected. ERROR: The certificate of 'tug.org' is not trusted. ERROR: The certificate of 'tug.org' has expired. ! Error: Can't execute wget. C:\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 5:
这是一个暂时的问题和/或已知问题吗?
答案1
C:\texlive\2020\texmf-dist\scripts\getnonfreefonts\getnonfreefonts.pl
我最近遇到了同样的问题,并通过更改第 496 行(可能与您的版本不同)解决了这个问题
system ("$WGET", "$getfont_url") == 0
到
system ("$WGET", "$getfont_url","--no-check-certificate") == 0
当然,这是一个安全风险,因为您没有验证 SSL 证书,但它提供了我需要的快速修复。