Latex texstudio Use of uninitialized value $ver

宗政深
2023-12-01

安装完Tex live,在texstudio里面对tex文件进行编译时出现以下错误:

Process started: pdflatex.exe -synctex=1 -interaction=nonstopmode "bare_jrnl_compsoc".tex

Use of uninitialized value $ver in scalar chomp at D:/texlive/2020pkg/TeXLive/TLWinGoo.pm line 205. 
Use of uninitialized value $ver in substitution (s///) at D:/texlive/2020pkg/TeXLive/TLWinGoo.pm line 206. 
Use of uninitialized value $ver in substitution (s///) at D:/texlive/2020pkg/TeXLive/TLWinGoo.pm line 206.
fmtutil: fmtutil is using the following fmtutil.cnf files 
...
Can't spawn "cmd.exe": No such file or directory at d:\texlive\2020\texmf-dist\scripts\texlive\fmtutil.pl line 600. fmtutil [WARNING]: inifile pdflatex.ini for pdflatexftex not found.
fmtutil [INFO]: disabled formats: 5 fmtutil [INFO]: not selected formats: 54 fmtutil [INFO]: failed to build: 1 
...

查阅资料发现是环境变量被修改了(此处感谢[LaTeX 发行版] TeX Live 无法使用,uninitialized value $ver

把 “%SystemRoot%\System32”(注意大小写)添加到 系统变量中的PATH 环境变量即可。

添加环境变量的方式:此电脑图标右键–>属性–>关于–>相关设置–>高级系统设置–>环境变量–>系统变量–>Path–>编辑–>新建。。。

 类似资料: