【问题标题】:installation of package 'tinytex' had non-zero exit status安装包“tinytex”的退出状态非零
【发布时间】:2021-04-17 00:40:00
【问题描述】:

这方面很新,所以如果我做了一些愚蠢的事情或错过了一步,我很抱歉!

在我公司允许我使用的 Windows 10 企业版 R 上运行的是:

R 版本 3.5.1 (2018-07-02) -- “羽毛喷雾” 版权所有 (C) 2018 统计计算 R 基金会

平台:x86_64-w64-mingw32/x64(64位)

运行的文本是

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

【问题讨论】:

  • 日志说xfun-0.13有问题,你试过用install.packages("xfun")升级到最新吗?
  • 如果您从源代码而不是二进制文件安装(当它询问您时),您将安装正确版本的xfun

标签: r installation tinytex


【解决方案1】:

问题在于 R 正在尝试安装 xfun 的二进制版本,即 0.13 版。

但是,tinytex 软件包(0.22 版)需要 xfun 的 0.19 或更高版本。

鉴于您使用的是旧版本的 R (3.5.1),可能难以升级。你可以尝试三件事。

首先,卸载所有已安装的xfuntinytex 版本。下载 Rtools 35 from this page 并安装它。然后从源安装包:

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

如果这不起作用:您可以尝试从 CRAN(xfuntinytex)下载最新的压缩 Windows 二进制文件并从文件安装。

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

这将启动一个文件选择对话框。 但是考虑到您的旧 R 版本,这很可能不起作用。

最后一个选项是从CRAN time machine 下载旧版本的 R 3.5.1 二进制文件。这是xfuntinytex 的直接链接。下载压缩的 Windows 二进制文件并按照上述说明从文件中安装。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-14
    • 2016-11-25
    • 1970-01-01
    • 2020-08-24
    • 2016-03-16
    • 1970-01-01
    相关资源
    最近更新 更多