Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline installation #121

Closed
antoinecollet5 opened this issue Jun 3, 2019 · 4 comments
Closed

Offline installation #121

antoinecollet5 opened this issue Jun 3, 2019 · 4 comments
Labels

Comments

@antoinecollet5
Copy link

antoinecollet5 commented Jun 3, 2019

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 ?

@yihui
Copy link
Member

yihui commented Jun 3, 2019

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.

@yihui yihui closed this as completed Jun 3, 2019
@yihui yihui added the question label Jun 3, 2019
@antoinecollet5
Copy link
Author

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

@Matth92ias
Copy link

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?

@Matth92ias Matth92ias mentioned this issue May 31, 2021
3 tasks
@cderv
Copy link
Contributor

cderv commented May 31, 2021

@Matth92ias see #312 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants