在Linux上编织的R-Markdown问题

时间:2020-02-26 13:42:19

标签: r r-markdown

我在Linux(Fedora 31)上安装了R-Studio。现在,我想用R-Markdown编织一个元素。在这种情况下,这是默认示例模板。

但是在编织过程结束时,出现以下错误消息:

*** WARNING ***: Performing this action will likely destroy the Fedora TeXLive install on your system.
*** WARNING ***: This is almost NEVER what you want to do.
*** WARNING ***: Try using dnf install/update instead.
*** WARNING ***: If performing this action is really what you want to do, pass the "ignore-warning" option.
*** WARNING ***: But please do not file any bugs with the OS Vendor.
add of symlinks had 3 error(s), see messages above.
add_link_dir_dir: destination /usr/local/bin not writable, no links from /usr/share/texlive/bin/x86_64-linux.
add_link_dir_dir: destination /usr/local/share/info not writable, no links from /usr/share/texlive/texmf-dist/doc/info.
man symlink destination (/usr/local/share/man) not writable, cannot add symlinks.
tlmgr: An error has occurred. See above messages. Exiting.
! LaTeX Error: File `framed.sty' not found.

! Emergency stop.
<read *> 

Fehler: LaTeX failed to compile test.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See test.log for more info.

我该怎么解决这个问题?

1 个答案:

答案 0 :(得分:0)

最好的选择是安装一个单独的tex-live副本,因为警告建议不要与Fedora的tex-live的预安装版本混淆,这很可能是Fedora中其他资源所需要的。

首先下载texlive-https://www.tug.org/texlive/acquire-netinstall.html

您需要使$ USER可以使用目标文件夹,然后将它们添加到要安装tlgm的安装位置的文件夹位置,默认位置为/ usr / local / texlive,而-R是递归的。

$ sudo chown -R $USER /usr/local/ 
$ cd Downloads
$ $ tar -xzvf install-tl-unx.tar.gz
$ cd install-tl* # enter the tex-live main folder   
$ perl install-tl

现在您将在命令行界面中看到一个菜单选项。在“输入命令”中,键入“ O + Enter”。

enter image description here

在下一个菜单上,按“ L + Enter”以创建指向用户可用的控制器的符号链接。就我而言,/usr/local/*

enter image description here

最后,按“ R + Enter”返回主菜单,然后按“ I + Enter”开始安装tex-live。

最后,在sudoers中设置texlive路径,并将路径添加到Defaults secure path =以添加您的texlive二进制文件位置,即在我的机器上是/usr/local/texlive/2019/bin/x86_64-linux

$ sudo nano /etc/sudoer