A further little trick with tlmgr: Trouble downloading and unzipping
Went to install some LaTeX packages I needed and typed this at the command line:
$ tlmgr install comment
[1/1, ??:??/??:??] install: comment [248k] 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/comment.tar.xz) TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/comment.tar.xz TLUtils::download_file: retrying with wget. TLUtils::download_file: retry with wget failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/comment.tar.xz Downloading ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/comment.tar.xz did not succeed, please retry. TLPDB::_install_package: couldn't unpack ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/comment.tar.xz to /home/username/installs/texlive/2015/texmf-dist tlmgr: package log updated: /home/username/installs/texlive/2015/texmf-var/web2c/tlmgr.log
This is ungood. I had already made sure I was using the correct repository, so I knew it was not that. But tlmgr has a switch to force it to use a new connection to the server, rather than trying to reuse a ‘persistent’ one. If the persistent one fails it falls back on wget, which is what the error message above sort of says; what it does not make clear is that the download still failed for some reason.
It is possible to force tlmgr to make a fresh connection each time, and this will work on a wider variety of routers, wifi networks and the like:
$ tlmgr --no-persistent-downloads install chemfig
And this worked a treat. The option can be set in the config file.
$ tlmgr conf tlmgr
shows which configuration file tlmgr is using. It may not exist yet.
$ tlmgr conf tlmgr persistent-downloads 0
has the result of setting non-persistent as the default behaviour, but the documentation is flaky (it says you need an equals sign in there, but that seems to mess it up).
If you then rerun
$ tlmgr conf tlmgr
you’ll see that the configuration value indeed seems to have been inserted into some configuration path somewhere. When I installed a package it worked without the command line flag.