为什么 tlmgr 这么慢?

为什么 tlmgr 这么慢?

我想在分享Latex 0.2.0 Docker 镜像,但是它有 2016tlmgr和 2015 texlive,所以不是最佳的。

当我执行以下操作时

tlmgr option repository ftp://tug.org/historic/systems/texlive/2015/tlnet-final
tlmgr install ms
tlmgr install ...

安装每个软件包大约需要 5 分钟,我感觉某个地方有一个 sleep 命令。以下是第一个安装的软件包的输出。

问题

有人知道如何加快这个速度吗?

tlmgr: setting default package repository to ftp://tug.org/historic/systems/texlive/2015/tlnet-final
Useless content call in void context at /usr/share/perl5/LWP/Protocol/ftp.pm line 379.
TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/tlpkg/texlive.tlpdb.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/tlpkg/texlive.tlpdb.xz
TLUtils::download_file: retrying with wget.
TLUtils::download_file: retry with wget succeeded: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/tlpkg/texlive.tlpdb.xz
TeX Live 2015 is frozen forever and will no
longer be updated.  This happens in preparation for a new release.

If you're interested in helping to pretest the new release (when
pretests are available), please read http://tug.org/texlive/pretest.html.
Otherwise, just wait, and the new release will be ready in due time.
Useless content call in void context at /usr/share/perl5/LWP/Protocol/ftp.pm line 379.
TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.tar.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.tar.xz
TLUtils::download_file: retrying with wget.
tlmgr: package repository ftp://tug.org/historic/systems/texlive/2015/tlnet-final
[1/1, ??:??/??:??] install: ms [2054k]
TLUtils::download_file: retry with wget succeeded: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.tar.xz
Useless content call in void context at /usr/share/perl5/LWP/Protocol/ftp.pm line 379.
TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz
TLUtils::download_file: retrying with wget.
TLUtils::download_file: retry with wget succeeded: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz
Useless content call in void context at /usr/share/perl5/LWP/Protocol/ftp.pm line 379.
TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.doc.tar.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.doc.tar.xz
TLUtils::download_file: retrying with wget.
TLUtils::download_file: retry with wget succeeded: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.doc.tar.xz
tlmgr: package log updated: /usr/local/texlive/2015/texmf-var/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.

答案1

原因是每个包都首先通过 ftp 尝试,但LWP失败了,请参见:

TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz
TLUtils::download_file: retrying with wget.

然后 wget 即可立即运行。要禁止使用 LWP,您可以将选项传递--no-persistent-downloadstlmgr,或者在 的配置文件中设置它tlmgr

相关内容