TobKel
TobKel

Reputation: 1453

R-Markdown Problems to knit on Linux

I'm installed R-Studio on Linux (Fedora 31). Now I want to knit an element with R-Markdown. In this case this is the default- example template.

But in the end of the knitting-process the following error-message appears:

*** 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.

What can I do to solve this problem?

Upvotes: 0

Views: 439

Answers (1)

tcratius
tcratius

Reputation: 585

The best bet is to install a separate copy of tex-live as the warning recommends not messing with Fedora's pre-installed version of tex-live, which most likely is needed for other resources in Fedora.

First download texlive - https://www.tug.org/texlive/acquire-netinstall.html

You need to make the destination folder available to you $USER so add them to the folder location of where you are going to install tlgm to install to, the default is /usr/local/texlive with -R being recursive.

$ 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

You will now see a menu option in the command-line interface. At the "Enter Command" type "O + Enter".

enter image description here

On the next menu press "L + Enter" to create a symbolic link to the directors available to your user. In my case /usr/local/*.

enter image description here

Finally, press "R + Enter" to return to the main menu, followed by "I + Enter" to start to install tex-live.

Lastly, set-up the texlive path in sudoers and add the path to Defaults secure path = to add your texlive binary file location i.e. on my machine it is /usr/local/texlive/2019/bin/x86_64-linux

$ sudo nano /etc/sudoer

Upvotes: 1

Related Questions