• Analysis
    Version info: VS code:1.50.0, Tex Live:2019/Debian, LaTex Workshop:8.13.2
  • Action
    Make sure your operation is correct by referencing to official guideline and VS Code + LaTeX.

    1. Install TexLive: TeXLive即LaTeX的编译环境, Use latex --help or latex -version to check the installation status and result. For me, I just used sudo apt install texlive-latex-base to install it.
    2. Install LaTex Workshop Plugin
    3. PATH related, Does the executable exist?
      See the OUTPUT of LaTex Workshop and got:
[16:26:14] BUILD command invoked.
[16:26:14] Current workspace folders: ["file:///home/shane/repo/hello-world"]
[16:26:14] Current workspaceRootDir: /home/shane/repo/hello-world
[16:26:14] Found root file from active editor: /home/shane/repo/hello-world/toExplore/LaTex/template/IS2019_paper_kit/IS2019_paper_kit/LaTeX/template.tex
[16:26:14] Keep using the same root file: /home/shane/repo/hello-world/toExplore/LaTex/template/IS2019_paper_kit/IS2019_paper_kit/LaTeX/template.tex.
[16:26:14] Building root file: /home/shane/repo/hello-world/toExplore/LaTex/template/IS2019_paper_kit/IS2019_paper_kit/LaTeX/template.tex
[16:26:14] Build root file /home/shane/repo/hello-world/toExplore/LaTex/template/IS2019_paper_kit/IS2019_paper_kit/LaTeX/template.tex
[16:26:14] Recipe step 1: latexmk, -synctex=1,-interaction=nonstopmode,-file-line-error,-pdf,-outdir=/home/shane/repo/hello-world/toExplore/LaTex/template/IS2019_paper_kit/IS2019_paper_kit/LaTeX,/home/shane/repo/hello-world/toExplore/LaTex/template/IS2019_paper_kit/IS2019_paper_kit/LaTeX/template
[16:26:14] cwd: /home/shane/repo/hello-world/toExplore/LaTex/template/IS2019_paper_kit/IS2019_paper_kit/LaTeX
[16:26:14] LaTeX build process spawned. PID: undefined.
[16:26:14] LaTeX fatal error: spawn latexmk ENOENT, . PID: undefined.
[16:26:14] Does the executable exist? PATH: /home/shane/anaconda3/bin:/home/shane/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[16:26:14] The current SHELL: /bin/bash
  • Solution
    From Github, this seems to be correct solution shown as below,

Replicating the value of PATH in the env field of the plugin recipe resolves the issue. For some reason, it looks like VSCode does not retrieve the $PATH from the shell. I did not have this issue until today, quite possibly until the latest VSCode update, released this morning (GMT).(https://github.com/James-Yu/LaTeX-Workshop/issues/1742)
But how to replicate the value of PATH in the env field of the plugin recipe?

[201027] Make it work
After uninstalled texlive-latex-base by sudo apt-get autoremove --purge texlive-latex-base, and re-install texlive 2020, I got ‘Command ‘tex’ not found’ when I type tex --version.

Then I followed guideline texlive-en.pdf, and the following lines to ‘$HOME/.profile’:

PATH=/usr/local/texlive/2020/bin/x86_64-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2020/texmf-dist/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2020/texmf-dist/doc/info:$INFOPATH; export INFOPATH

Then I run source ~/.profile to reload .profile

And read version was succeeded.

Then I installed LaTex workshop in VS code, and it run well.

Lesson learn

  1. Follow guide of Latex Workshop instead of thinking it by yourself. For me, I just made a mistake in installing Tex Live.

Recipe terminated with fatal error: spawn latexmk ENOENT.相关推荐

  1. VScode+Latex (Recipe terminated with fatal error: spawn xelatex ENOENT)和latex简单使用介绍

    文章目录 一.安装 (一)下载 (二)使用vscode进行编辑 (三)使用VSCode编辑出现Recipe terminated with fatal error: spawn xelatex ENO ...

  2. Recipe terminated with fatal error: spawn xelatex ENOENT

    打算在Windows下用texlive+vscode写论文,编译的时候报错了 Recipe terminated with fatal error: spawn xelatex ENOENT 解决方法 ...

  3. Windows下用texlive+vscode报错Recipe terminated with fatal error: spawn xelatex ENOENT

    texlive安装完成后把D:\sofeware\texlive\2021\bin\win32(安装目录)添加到了用户变量,我又把它加入到系统变量里面,重启vscode,之后就可以了

  4. 解决 Error: spawn xdg-open ENOENT

    目录 问题描述: 解决方法: 问题描述: docker 里 npm run dev 运行项目后提示 Error: spawn xdg-open ENOENT 退出,问题原因是无法打开浏览器. 解决方法 ...

  5. spawn php enoent,angular运行报错 Error: spawn cmd ENOENT

    Angular项目运行时报错 Error: spawn cmd ENOENT 详细报错信息如下:events.js:200 throw er; // Unhandled 'error' event ^ ...

  6. centos7 minimal运行vue项目npm run serve时报错:Error: spawn xdg-open ENOENT --解决办法:yum install xdg-utils

    解决办法:安装cdg-open yum install xdg-utils

  7. Error: spawn cmd ENOENT at Process.ChildProcess._handle.onexit

    解决方案:在系统变量 Path 里面加上:%SystemRoot%\system32,关掉cmd,重新启动项目. 详细步骤: 1.点击桌面 此电脑 ,右键 属性 : ​ 2.找到 高级系统设置 ; ​ ...

  8. Error: spawn cmd ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19

    解决方法: 在path变量中添加: %SystemRoot%\system32

  9. 关于 VUE 项目启动报错,Error: spawn cmd ENOENT at Process.ChildProcess._handle.onexit...后面太多我就不粘贴了

    从网上查了之后说是环境变量的问题 试了几次最终试出来成功运行了 第一步 在控制面板找到编辑系统环境变量 第二步 点击环境变量 第三步 双击Path 第四步 点击新建 添加如下字符(两个我都试过了,都有 ...

最新文章

  1. 小程序provisional headers are shown_万圣节~英语早教绘本Five Little Pumpkins五个小南瓜...
  2. python监听器_监听器 - python成长中 - 博客园
  3. Spring Boot 2.x整合Apollo代码示例
  4. 51nod 1632 B君的连通
  5. 分数的大小比较优秀教案_人教版小学数学五年级下册异分母分数加、减法公开课优质课课件教案视频...
  6. oracle中dblink怎么用,Oracle中建立了dblink怎么使用
  7. java 秒杀 源码 下载_java高并发秒杀系统3-4节秒杀功能实现.mp4
  8. 打包巨慢怎么办?这些工具让你爱不释手
  9. python批量读取Excel文件
  10. 多商户商城小程序源码有何优势?
  11. 大数据技术原理与应用(第三版)林子雨教材配套实验答案---实验二 熟悉常用的hdfs操作
  12. 电精2(电神魔傀2) android版本下载
  13. svn和git 常用的命令
  14. 技能高考计算机专业考什么,2016年技能高考计算机专业考试总结.pdf
  15. vue 在线阅读PDF
  16. blender 长度单位设置
  17. 对敏捷宣言的原则进行风险评估
  18. linux 循环一段ip区间,Shell脚本实现判断IP地址是否在一个ip段内代码分享
  19. H5 canvas基础入门到捕鱼达人小游戏实现(1)
  20. PBX220评测报告

热门文章

  1. 国内三大主流CDN横向全对比
  2. 查表法与switch有什么区别?
  3. 计算机专业见刊快的普刊,可以快速见刊的普刊有哪些?
  4. 父母该如何辅导孩子做作业
  5. MATLAB判断是不是质数,matlab 如何表示一个数是不是质数,如题 。
  6. 云上PDF怎么删除页眉页脚_怎么删除PDF文档中多余的页面
  7. lightroom最新版本下载_277手游盒子最新版本下载(完美世界)
  8. 企业邮箱排名,收费企业邮箱哪家好?
  9. 创业思维 - LeanCloud的故事
  10. 期望值(Expected Value,EV)