I have installed TexLive on Ubuntu 20.04.1 LTS using
sudo apt-get install texlive After this I created a file "text.tex" in Visual Studio Code. I installed the Plugin "Latex Workshop" and tried to preview or Build the .tex File.
I received the following error:
Recipe terminated with fatal error: spawn latexmk ENOENT. According to this:
https://github.com/James-Yu/LaTeX-Workshop/issues/1742 The reason for this is, that something is wrong with the PATH Variable
I am not sure whether TexLive is actually included in my PATH:
Using echo $PATH yields:
/home/tony/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/mssql-tools/bin I can use latex-v and which latex yields:
/usr/bin/latex TexLive itself is located at:
/usr/share/texlive I have tried to debug this by following the advice from the github page - I copied the content of m PATH variable into the "env" fields in the settings.json of LatexWorkshop, however, the error persists.
Someone solved a fairly similar problem here: How can I get VS Code LaTeX Workshop to choose the correct Latex distribution? This was on Windows however.
I am not sure whether something is wrong with my TexLive installation, my PATH variable or something is buggy or falsely set up within VSCode/LatexWorkshop.
latexmk? Ubuntu breaks texlive up into a number of Ubuntu packages (not to be confused with latex packages). You can use theapt-filetool to figure out which Ubuntu package provideslatexmk(apt-file search latexmk), I think it is calledlatexmk. Note thatapt-fileneedssudo apt-file updatefrom time to time.