无法在Windows上安装TinyTex-访问被拒绝

时间:2020-05-07 15:48:50

标签: r rstudio r-markdown tinytex

我一直在尝试使用tinytex::install_tinytex()从RStudio安装TinyTex,并在安装结束时遇到Access is denied问题。我使用安装了Windows的企业笔记本电脑,但是我拥有本地管理员特权。从我发现的内容来看,虽然安装尚未完成,但看起来已完成。

tinytex::tinytex_root()返回以下目录:“ C:\ Users \ username \ AppData \ Roaming \ TinyTeX”,但从我注意到该目录未在PATH变量中设置(尽管我在安装乳胶后重新启动了RStudio)。我还尝试使用tinytex:::install_prebuilt()安装TinyTex,但也导致了Access is denied错误。

当我尝试编译test.Rmd文件时,我得到:

In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
  'CreateProcess' failed to run 'C:\Users\username~1\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe -halt-on-error -interaction=batchmode "test.tex"'
Execution halted

因此,我想问一下我是否可以做些什么来正确安装TinyTex?我能否至少浏览到我应该有权访问哪个目录才能完成安装?

这是xfun::session_info('tinytex')的输出:

R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362), RStudio 1.2.5042

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

Locale:
  LC_COLLATE=Polish_Poland.1250  LC_CTYPE=Polish_Poland.1250    LC_MONETARY=Polish_Poland.1250
  LC_NUMERIC=C                   LC_TIME=Polish_Poland.1250    

Package version:
  graphics_3.6.3  grDevices_3.6.3 stats_3.6.3     tinytex_0.22    tools_3.6.3     utils_3.6.3     xfun_0.13

0 个答案:

没有答案