簡體   English   中英

在 Linux 上編織的 R-Markdown 問題

[英]R-Markdown Problems to knit on Linux

我在 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.

我能做些什么來解決這個問題?

最好的辦法是安裝一個單獨的 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”。

在此處輸入圖片說明

在下一個菜單上,按“L + Enter”創建指向用戶可用導演的符號鏈接。 在我的情況下/usr/local/*

在此處輸入圖片說明

最后按“R+回車”返回主菜單,再按“I+回車”開始安裝tex-live。

最后,在 sudoers 中設置 texlive 路徑並將路徑添加到Defaults secure path =添加您的 texlive 二進制文件位置,即在我的機器上它是/usr/local/texlive/2019/bin/x86_64-linux

$ sudo nano /etc/sudoer

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM