Tinytex: Offline installation

Created on 3 Jun 2019  路  4Comments  路  Source: yihui/tinytex

Hi !
I am facing a similar issues than tbradley1013, see Issue#69. The problem is that I am blocked by my company proxies/network, so I have to download and install all package binaries.
Of course, the pdf export from Rmd is not working. Here is how it goes with installing:

install.packages("~/7 - Software/R/Packages/MarkDownPackages/tinytex_0.13.tar.gz", repos = NULL, type = "source")
* installing *source* package 'tinytex' ...
** package 'tinytex' correctement d茅compress茅 et sommes MD5 v茅rifi茅es
** 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 ... fini
    copy_tinytex                            html  
    install_tinytex                         html  
    latexmk                                 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_root
function () 
{
    tweak_path()
    path = Sys.which("tlmgr")
    if (path == "") 
        return("")
    root_dir = function(path, ...) {
        dir = normalizePath(file.path(dirname(path), ...), mustWork = TRUE)
        if (!"bin" %in% list.files(dir)) 
            stop(dir, " does not seem to be the root directory of TeX Live (no \"bin/\" dir under it)")
        dir
    }
    if (os == "windows") 
        return(root_dir(path, "..", ".."))
    if (Sys.readlink(path) == "") 
        stop("Cannot figure out the root directory of TeX Live from ", 
            path, " (not a symlink on ", os, ")")
    path = symlink_root(path)
    root_dir(normalizePath(path), "..", "..", "..")
}
<bytecode: 0x000000001671c420>
<environment: namespace:tinytex>


> tinytex:::is_tinytex()
[1] FALSE

I download the "TinyTeX.zip" (~93 Mb) and try to install it manually. It does not work.

install.packages("~/7 - Software/R/Packages/TinyTeX.zip", repos = NULL, type = "win.binary")
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
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
  cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'

Do you think there might be a way to overcome it ?

question

Most helpful comment

Thank you a lot ! It worked great :) I can now export pdf youhou !!!!

> installer = "C:\\Users\\ancollet\\Documents\\7 - Software\\R\\Packages\\TinyTex.zip"
> tinytex:::install_windows_zip(installer)
tlmgr path add
Use of uninitialized value in bitwise or (|) at C:\Users\ancollet\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl line 1482.
texhash: Updating C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-local/ls-R...
texhash: Updated C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-local/ls-R.
texhash: Updating C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-config/ls-R...
texhash: Updated C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-config/ls-R.
texhash: Updating C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-var/ls-R...
texhash: Updated C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-var/ls-R.
texhash: Updating C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-dist/ls-R...
texhash: Updated C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-dist/ls-R.
texhash: Done.
...ancollet\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:922: ...ancollet\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:853: no appropriate script or program found: fmtuti~1
...ancollet\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:922: ...ancollet\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:853: no appropriate script or program found: updmap~1
Note that it needs some time to create caches,
especially if there are many large font files.
Wait with patience.

C:/windows/fonts: caching, new cache contents: 1064 fonts, 0 dirs
C:/Users/appveyor/AppData/Roaming/TinyTeX/texmf-dist/fonts/opentype: skipping, no such directory
C:/Users/appveyor/AppData/Roaming/TinyTeX/texmf-dist/fonts/truetype: skipping, no such directory
C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-var/fonts/cache: cleaning cache directory
C:\Users\ancollet\AppData\Roaming\TinyTeX\bin\win32\fc-cache.exe: succeeded
[1] 0
> tinytex:::is_tinytex()
[1] TRUE

All 4 comments

TinyTeX.zip is not an R package, so you cannot use install.packages() to install it. After you download it, use tinytex:::install_windows_zip() to install it instead.

Thank you a lot ! It worked great :) I can now export pdf youhou !!!!

> installer = "C:\\Users\\ancollet\\Documents\\7 - Software\\R\\Packages\\TinyTex.zip"
> tinytex:::install_windows_zip(installer)
tlmgr path add
Use of uninitialized value in bitwise or (|) at C:\Users\ancollet\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl line 1482.
texhash: Updating C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-local/ls-R...
texhash: Updated C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-local/ls-R.
texhash: Updating C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-config/ls-R...
texhash: Updated C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-config/ls-R.
texhash: Updating C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-var/ls-R...
texhash: Updated C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-var/ls-R.
texhash: Updating C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-dist/ls-R...
texhash: Updated C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-dist/ls-R.
texhash: Done.
...ancollet\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:922: ...ancollet\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:853: no appropriate script or program found: fmtuti~1
...ancollet\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:922: ...ancollet\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:853: no appropriate script or program found: updmap~1
Note that it needs some time to create caches,
especially if there are many large font files.
Wait with patience.

C:/windows/fonts: caching, new cache contents: 1064 fonts, 0 dirs
C:/Users/appveyor/AppData/Roaming/TinyTeX/texmf-dist/fonts/opentype: skipping, no such directory
C:/Users/appveyor/AppData/Roaming/TinyTeX/texmf-dist/fonts/truetype: skipping, no such directory
C:/Users/ancollet/AppData/Roaming/TinyTeX/texmf-var/fonts/cache: cleaning cache directory
C:\Users\ancollet\AppData\Roaming\TinyTeX\bin\win32\fc-cache.exe: succeeded
[1] 0
> tinytex:::is_tinytex()
[1] TRUE

I am running into the same problem. When executing the function tinytex::install_tinytex() my Proxy does not allow me to download the .tar.gz file from https://yihui.org/tinytex/TinyTeX-1.tar.gz. Because I work on a company server this is not easy to change. I downloaded the .tar.gz file manually and uploaded it to my server.
Unfortunately the function tinytex:::install_windows_zip does not seem to exist anmyore. I also found the following post on stackoverflow https://stackoverflow.com/questions/66494997/how-to-install-tinytex-from-zip-file-install-windows-zip-not-working where a user commented that the function is probably removed from the package.
Is there another option for an offline installation?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leafyeh7 picture leafyeh7  路  6Comments

boltomli picture boltomli  路  3Comments

FMKerckhof picture FMKerckhof  路  5Comments

nickp60 picture nickp60  路  6Comments

cderv picture cderv  路  7Comments