Cannot install tinytex

Tried to install tinytex multiple ways.
tinytex::install_tinytex() and tinytex:::install_prebuilt()
I even tried to install from source zip.

The only feedback I get is:
Warning in install.packages :
cannot open compressed file 'TinyTeX/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection

As a test I run
tinytex::tlmgr_install('iftex')
tlmgr install iftex
tlmgr update --self
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
In addition: Warning message:
In tlmgr(c("install", pkgs), usermode, ...) :
TeX Live does not seem to be installed. See TinyTeX - A lightweight, cross-platform, portable, and easy-to-maintain LaTeX distribution based on TeX Live - Yihui Xie | 谢益辉.

I also tried this and it is empty.

tinytex::tinytex_root()
[1] ""

Hi @klaasb01,
Maybe I have missed the point of your question, but does this simple console command work to install the tinytex binary package from CRAN?

install.packages("tinytex")

On Windows 11, I'm getting version 0.36
If not, then your internet connection maybe blocking access to CRAN?

What was the error message from this command ?

These functions from tinytex R package should download and install the TinyTeX distribution

Here it means you tried to install TinyTeX.zip using install.packages(). This function is for R package, and TinyTeX.zip is not an R package. Use tinytex::install_tinytex() directly.

This is because TeX Live is not install as TinyTeX is not install. tlmgr does not exist yet so you can't install a CTAN package.

This shows that TinyTeX is not yet install.

Yes I did the install.packages('tinytex) so I could get the tinytex::install_tinytex() functions.
It look like the download gets cut off @ 82MB and it should be 99.8MB.

This is what I get.

install.packages('tinytex')
Installing package into ‘C:/Users/ca10063026/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/tinytex_0.36.zip'
Content type 'application/zip' length 129072 bytes (126 KB)
downloaded 126 KB

package ‘tinytex’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\ca10063026\AppData\Local\Temp\Rtmp4AgLyu\downloaded_packages

tinytex::install_tinytex()
trying URL 'https://yihui.org/tinytex/TinyTeX-1.zip'
trying URL 'https://yihui.org/tinytex/TinyTeX-1.zip'
Content length 652 bytes
downloaded 82.5 MB

trying URL 'https://yihui.org/tinytex/TinyTeX-1.zip'
Content type 'application/octet-stream' length 104603812 bytes (99.8 MB)
downloaded 82.5 MB

Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
In addition: Warning message:
In extract(pkg, exdir = path.expand(target)) :
error 1 in extracting from zip file

I'm betting there is a proxy issue at this point.

ok So I tried a different approach remotes::install_github('yihui/tinytex') and that does not work either.
I might have to go and open an issue on github.

remotes::install_github('yihui/tinytex')
Downloading GitHub repo yihui/tinytex@HEAD
Running R CMD build...

  • checking for file 'C:\Users\xxxxxxx\AppData\Local\Temp\RtmpIZ5Pjr\remotes49c850a1599b\yihui-tinytex-1725fa9/DESCRIPTION' ... OK
  • preparing 'tinytex':
  • checking DESCRIPTION meta-information ... OK
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building 'tinytex_0.36.2.tar.gz'
    Installing package into ‘C:/Users/10063026/OneDrive - BD/Documents/R/win-library/4.1’
    (as ‘lib’ is unspecified)
  • installing source package 'tinytex' ...
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    converting help for package 'tinytex'
    finding HTML links ... done
    check_installed html
    copy_tinytex html
    install_tinytex html
    is_tinytex html
    latexmk html
    parse_install html
    parse_packages html
    r_texmf html
    tl_pkgs html
    tl_sizes html
    tlmgr html
    ** building package indices
    ** testing if installed package can be loaded from temporary location
    *** arch - i386
    *** arch - x64
    ** testing if installed package can be loaded from final location
    *** arch - i386
    *** arch - x64
    ** testing if installed package keeps a record of temporary installation path
  • DONE (tinytex)

tinytex::tlmgr_install('iftex')
tlmgr install iftex
tlmgr update --self
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
In addition: Warning message:
In tlmgr(c("install", pkgs), usermode, ...) :
TeX Live does not seem to be installed. See TinyTeX - A lightweight, cross-platform, portable, and easy-to-maintain LaTeX distribution based on TeX Live - Yihui Xie | 谢益辉.

> tinytex::tinytex_root()
[1] ""

This will install the tinytex R package in its devel version. It will not install the TinyTeX LaTeX distribution.

So doing right after

won't work because TinyTeX is still not install and tlmgr command cannot be found.

In you previous try, doing

is the good way to do that.

however, it seems there is an issue with unziping, maybe because download was not complete.

You could try downloading manually from there repo and use tinytex::install_prebuilt("path-to-downloaded-file"). GitHub - yihui/tinytex-releases: Windows/macOS/Linux binaries and installation methods of TinyTeX

As you are on windows, you can also get TinyTeX using Package manager

Hope it helps

1 Like

This solution worked.
I have to get IT to fix the firewall issue I wouldn't be surprised if it is the SSL intercept that is causing the issue.

1 Like

This topic was automatically closed 7 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.