r - 包 'tinytex' 的安装具有非零退出状态

标签 r installation tinytex

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

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

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

最佳答案

问题是 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 二进制文件。 .这是 xfun 的直接链接和 tinytex .下载压缩的 Windows 二进制文件并按照上述说明从文件进行安装。

关于r - 包 'tinytex' 的安装具有非零退出状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65677567/

相关文章:

php - 在配置 PHP 以使用 mySQL 时遇到问题

正则表达式查找前四个并发唯一值的位置

sql - 响应 SQL 的 'in' 语句的 R 语句是什么?

r - 在 R 2.15.0 中安装 Rcpp 包

R- shiny-plotly 第二轴标签与 yaxis 值重叠

r-markdown - 错误 : Failed to build the bibliography via biber {vitae}

c# - 为 64 位 Windows 计算机创建构建时出现 "Access to database file is not allowed"错误

ruby-on-rails - Ruby on Rails : "Error installing rails: rdoc requires json"

r - 无法编译 test.tex。有关调试提示,请参阅 https ://yihui. name/tinytex/r/#debugging。有关更多信息,请参阅 test.log。执行停止

knitr - 为什么没有检测到 Latex 安装