Rmarkdown 无法安装 Tinytex

Rmarkdown 无法安装 Tinytex

我看不出如何让它工作。我按照以下说明安装了 miktex:https://miktex.org/howto/install-miktex-unx。我安装了install.packages('tinytex'),然后当我这样做时,tinytex::install_tinytex()我得到了下面的错误。当我尝试在这里安装 tinytex 时,我得到了同样的@INC 错误https://yihui.org/tinytex/

--2020-09-01 22:01:58--  https://yihui.org/gh/tinytex/tools/tinytex.profile
Resolving yihui.org (yihui.org)... 2604:a880:400:d1::888:7001, 2604:a880:400:d0::caa:3001, 104.248.63.248, ...
Connecting to yihui.org (yihui.org)|2604:a880:400:d1::888:7001|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://tinytex.yihui.org/tinytex.profile [following]
--2020-09-01 22:01:58--  https://tinytex.yihui.org/tinytex.profile
Resolving tinytex.yihui.org (tinytex.yihui.org)... 2604:a880:400:d0::dff:1, 2604:a880:400:d0::72a:f001, 104.248.63.248, ...
Connecting to tinytex.yihui.org (tinytex.yihui.org)|2604:a880:400:d0::dff:1|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 183 [application/octet-stream]
Saving to: ‘tinytex.profile’

     0K                                                       100% 5.75M=0s

2020-09-01 22:01:58 (5.75 MB/s) - ‘tinytex.profile’ saved [183/183]

Can't locate Encode.pm in @INC (you may need to install the Encode module) (@INC contains: ../install-tl-20200901/tlpkg /home/coyote/tools/perl/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/local/share/perl/5.26.1/Pod/Text.pm line 24.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.26.1/Pod/Text.pm line 24.
Compilation failed in require at (eval 2) line 1.
BEGIN failed--compilation aborted at /usr/local/lib/x86_64-linux-gnu/perl/5.26.1/Pod/Usage.pm line 30.
Compilation failed in require at ../install-tl-20200901/install-tl line 138.
BEGIN failed--compilation aborted at ../install-tl-20200901/install-tl line 138.
rm: cannot remove 'install-tl.log': No such file or directory
sh: 45: ./bin/*/tlmgr: not found
sh: 55: ./bin/*/tlmgr: not found
mv: cannot stat 'texlive/*': No such file or directory
install-unx.sh: 20: install-unx.sh: /home/coyote/.TinyTeX/bin/*/tlmgr: not found
install-unx.sh: 27: install-unx.sh: /home/coyote/.TinyTeX/bin/*/tlmgr: not found
sh: 1: NA: not found
sh: 1: NA: not found
TinyTeX installed to /home/coyote/.TinyTeX
You may have to restart your system after installing TinyTeX to make sure ~/bin appears in your PATH variable (https://github.com/yihui/tinytex/issues/16).
Warning messages:
1: In system2(bin, c("path", "add")) : error in running command
2: In system2(bin, c("conf", "auxtrees", "add", r_texmf_path())) :
  error in running command
3: In tinytex::install_tinytex() :
  TinyTeX was not successfully installed or configured.Your PATH variable is /home/coyote/tools/bin/linux:/home/coyote/tools/bin/linux:/home/coyote/tools/bin/linux:/home/coyote/tools/bin/linux:/home/coyote/tools/bin/linux:/home/coyote/tools/bin/linux:/usr/local/ncbi/sra-tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin. See https://yihui.org/tinytex/faq/ for more information.

答案1

看来我的 perl 坏了,在sudo apt-get install --reinstall libperl5.26我能够运行wget -qO- "https://yihui.org/gh/tinytex/tools/install-unx.sh" | sh和安装之后。

相关内容