3

Very new at this so I am sorry if I have done something stupid or missed a step!

Running on windows 10 enterprise Version of R my company allows me to use is:

R version 3.5.1 (2018-07-02) -- "Feather Spray" Copyright (C) 2018 The R Foundation for Statistical Computing

Platform: x86_64-w64-mingw32/x64 (64-bit)

Text from run is

install.packages('tinytex')
also installing the dependency 'xfun'
  There are binary versions available but the source versions are later:
        binary source needs_compilation
xfun      0.13   0.20              TRUE
tinytex   0.22   0.28             FALSE

  Binaries will be installed
trying URL 'https://cran.ms.unimelb.edu.au/bin/windows/contrib/3.5/xfun_0.13.zip'
Content type 'application/zip' length 184719 bytes (180 KB)
downloaded 180 KB

package 'xfun' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\p1311516\AppData\Local\Temp\Rtmpu0Onn4\downloaded_packages
installing the source package 'tinytex'

trying URL 'https://cran.ms.unimelb.edu.au/src/contrib/tinytex_0.28.tar.gz'
Content type 'application/octet-stream' length 27595 bytes (26 KB)
downloaded 26 KB

In R CMD INSTALL
* installing *source* package 'tinytex' ...
** package 'tinytex' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in `loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :`
  namespace 'xfun' 0.13 is being loaded, but >= 0.19 is required
ERROR: lazy loading failed for package 'tinytex'
* removing 'C:/Program Files/R/R-3.5.1/library/tinytex'

The downloaded source packages are in
        'C:\Users\p1311516\AppData\Local\Temp\Rtmpu0Onn4\downloaded_packages'
Warning message:
In install.packages("tinytex") :
  installation of package 'tinytex' had non-zero exit status
neilfws
  • 32,751
  • 5
  • 50
  • 63
Sdunn
  • 31
  • 1
  • 2
  • The logs say that there was a problem with `xfun-0.13`, have you tried upgrading it to the newest with `install.packages("xfun")`? – r2evans Jan 12 '21 at 03:39
  • If you install from source instead of binary (when it asks you), you will install the correct version of `xfun` – Brigadeiro Jan 12 '21 at 03:44

1 Answers1

4

The issue is that R is trying to install the binary version of xfun which is version 0.13.

However, the tinytex package (version 0.22) requires version 0.19 or higher of xfun.

Given that you are stuck with an old version of R (3.5.1), it may be difficult to upgrade. You can try three things.

First, uninstall any installed versions of xfun and tinytex. Download Rtools 35 from this page and install it. Then install the packages from source:

install.packages(c("xfun", "tinytex"), type = "source")

If that doesn't work: you could try downloading the latest zipped Windows binaries from CRAN (xfun and tinytex) and installing from the files.

install.packages(file.choose(), repos = NULL)

which will launch a dialog for file selection. BUT this is quite likely not to work given your old R version.

The last option is to download old versions of the binaries for R 3.5.1 from the CRAN time machine. Here are direct links for xfun and tinytex. Download the zipped Windows binaries and install from files as described above.

neilfws
  • 32,751
  • 5
  • 50
  • 63