Can't download latex packges for tinytex with tlmgr

Hello everyone,

I can't download any latex/tinytex package using tlmgr / tinytex::tlmgr_install(). I get the following error:

C:\PROGRA~1\TinyTex\texmf-dist\scripts\texlive\ TLPDB::from_file could not initialize from:
C:\PROGRA~1\TinyTex\texmf-dist\scripts\texlive\ Maybe the repository setting should be changed.
C:\PROGRA~1\TinyTex\texmf-dist\scripts\texlive\ More info:

I am behind a proxy, which is why I've set up a ~/.wgetrc file with my proxy + autentification like this:


When I change the mirror as suggested in the error message like this, I get a different error....

tlmgr option repository
tinytex::tlmgr_install("tikz") Cannot find main repository, you have to tag one as main!

I'm not sure how to proceed at this point. Any help would be greatly appreciated!

PS: Using Windows 10 Enterprise, RStudio 2022.07.2, R 4.2.2. Tinytex itself is working and I'm able to compile PDFs as long as no additional packages are required.

Did you try by adding full url on the repository ? Your missing https here probably.

I don't know about this file. It probably should work, but you can also try using environment variables. Looking at tlmgr man page tlmgr - the native TeX Live Manager I see that the default download method is not wget but LWP. This PERL tool seems to respect environment variables

Hope it helps

Thanks for your reply. I've tried adding the https. Didn't do anything, sadly.

I've also added a system variable (actually I've had that all along) like this:


With this setting I've tried various mirrors. I'm still getting the same error message as before...

This seems definitely a TeX Live issue with your system. If you are in corporate environment (probably why proxy ?), then it could also happen that your proxy has some rules and do some filtering which prevent to access.

Can you reach the CTAN mirror without tlmgr ?

You should try also HTTP_PROXYand https_proxy and HTTPS_PROXY- case sensitivity can happen on some system, and the CTAN mirror seems to be HTTPS not HTTP.

If this is a download program issue to config proxy, then you could try switching to curl or wget by setting the TEXLIVE_DOWNLOADER as described in tlmgr help.

Otherwise, as a workaround, we provide different releases of TinyTeX including none to all CTAN packages.
If installing a more full version (or even the full CTAN one) is possible, then maybe it will contain the package you need and work in offline mode

Hope it helps

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.