James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.47k stars 519 forks source link

Cannot build latex project via remote ssh with problem Does the executable exist? #4203

Closed satanaileo closed 4 months ago

satanaileo commented 4 months ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [x] The issue has not been reported in this repository.
  • [x] The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • [x] The FAQ cannot address the issue.
  • [x] The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.

Environment*

Please write exact version numbers instead of descriptors such as latest.

  • Operating System: Ubuntu via remote ssh
  • Visual Studio Code Version: 1.87.2
  • LaTeX Workshop Version: 9.19.1
  • TeX Distribution Version: Tex Live 2024

Please list the environment and version number if you are using VSCodium, Snap or Flatpack versions of Visual Studio Code, and/or Visual Studio Code Remote Containers/SSH/WSL.

  • I am using XXX whose version is YY.ZZ

The Issue*

Please briefly describe the issue you come across.

  • I'm using latex-workshop via vscode remote ssh, and I've deployed texlive on my server, and have added enviroment variable to ~/.profile
  • When I'm trying to build my project, It fails and output like:
  • Does the executable exist? $PATH: /home/user007/.vscode-server/cli/servers/Stable-/server/bin/remote-cli:/home/user007/anaconda3/envs//bin:/home/user007/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user007/usr/local/texlive/2024/bin/x86_64-linux, $Path: undefined, $SHELL: /bin/bash
  • As you can see, in my $PATH there exists /home/user007/usr/local/texlive/2024/bin/x86_64-linux, but it still fails

Reproduction Steps

Please list out the steps to reproduce your bug. Include relevant environmental variables or any other configuration.

Expected Behavior

What were you expecting to see? Include any relevant examples or documentation links.

Logs

LaTeX Workshop Output*

Please paste the whole log messages below, not parts of ones. The log should start with New log placeholder %WS1% registered.


[22:43:29.812][Event] STRUCTURE_UPDATED
[22:43:34.097][Commander] BUILD command invoked.
[22:43:34.097][Build] The document of the active editor: file://%WS1%/docs/XJTU-thesis/main.tex
[22:43:34.098][Build] The languageId of the document: latex
[22:43:34.098][Root] Current workspace folders: ["file://%WS1%"]
[22:43:34.100][Root] Found root file from active editor: %WS1%/docs/XJTU-thesis/main.tex
[22:43:34.101][Root] Keep using the same root file: %WS1%/docs/XJTU-thesis/main.tex
[22:43:34.101][Event] ROOT_FILE_SEARCHED
[22:43:34.101][Event] STRUCTURE_UPDATED
[22:43:34.102][Build] Building root file: %WS1%/docs/XJTU-thesis/main.tex
[22:43:34.102][Build][Recipe] Build root file %WS1%/docs/XJTU-thesis/main.tex
[22:43:34.111][Build][Recipe] Found TeX program by magic comment: latexmk.
[22:43:34.112][Build][Recipe] Preparing to run recipe: XeLaTeX.
[22:43:34.112][Build][Recipe] Prepared 1 tools.
[22:43:34.115][Build][Recipe] outDir: %WS1%/docs/XJTU-thesis .
[22:43:34.117][Build] Recipe step 1 The command is xelatex:["-synctex=1","-interaction=nonstopmode","-file-line-error","main"].
[22:43:34.117][Build] env: undefined
[22:43:34.117][Build] root: %WS1%/docs/XJTU-thesis/main.tex
[22:43:34.118][Build] cwd: %WS1%/docs/XJTU-thesis
[22:43:34.156][Build] LaTeX build process spawned with PID 1392672.
[22:43:35.260][Build] Recipe returns with error code 1/null on PID 1392672.
[22:43:35.261][Build] Does the executable exist? $PATH: /home/user007/.vscode-server/cli/servers/Stable-863d2581ecda6849923a2118d93a088b0745d9d6/server/bin/remote-cli:/home/user007/anaconda3/envs/***/bin:/home/user007/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user007/usr/local/texlive/2024/bin/x86_64-linux, $Path: undefined, $SHELL: /bin/bash
[22:43:35.261][Build] 
[22:43:35.262][Build] Cleaning auxiliary files and retrying build after toolchain error.
[22:43:35.265][Cleaner] Clean temporary files command The command is latexmk:["-outdir=%WS1%/docs/XJTU-thesis","-c","%WS1%/docs/XJTU-thesis/main.tex"].
[22:43:35.304][Build] Recipe step 1 The command is xelatex:["-synctex=1","-interaction=nonstopmode","-file-line-error","main"].
[22:43:35.305][Build] env: undefined
[22:43:35.305][Build] root: %WS1%/docs/XJTU-thesis/main.tex
[22:43:35.306][Build] cwd: %WS1%/docs/XJTU-thesis
[22:43:35.343][Build] LaTeX build process spawned with PID 1392674.
[22:43:35.486][Event] AUTO_CLEANED
[22:43:36.450][Build] Recipe returns with error code 1/null on PID 1392674.
[22:43:36.451][Build] Does the executable exist? $PATH: /home/user007/.vscode-server/cli/servers/Stable-863d2581ecda6849923a2118d93a088b0745d9d6/server/bin/remote-cli:/home/user007/anaconda3/envs/***/bin:/home/user007/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user007/usr/local/texlive/2024/bin/x86_64-linux, $Path: undefined, $SHELL: /bin/bash
[22:43:36.451][Build] 
[22:43:36.452][Cleaner] Clean temporary files command The command is latexmk:["-outdir=%WS1%/docs/XJTU-thesis","-c","%WS1%/docs/XJTU-thesis/main.tex"].
[22:43:36.671][Event] AUTO_CLEANED

### Developer Tools Console
> _Please paste the whole log messages below, not parts of ones. This console logs can sometimes be very important in many cases. To access the log, click `Help` -> `Toggle Developer Tools` -> `Console`._

[Paste the log here. Do not remove the surrounding backquotes (`).]



## Anything Else?
> _Add any other context about the problem below._
- 
James-Yu commented 4 months ago

Can you compile with xelatex in command line?

satanaileo commented 4 months ago

Can you compile with xelatex in command line?

Yes, compile with xelatex is okay,and here is the output:

xelatex test.tex This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2024) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode (./test.tex LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-02-20> (/home/user007/usr/local/texlive/2024/texmf-dist/tex/latex/base/article.cls Document Class: article 2023/05/17 v1.4n Standard LaTeX document class (/home/user007/usr/local/texlive/2024/texmf-dist/tex/latex/base/size10.clo)) (/home/user007/usr/local/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend- xetex.def) (./test.aux) (/home/user007/usr/local/texlive/2024/texmf-dist/tex/latex/base/ts1cmr.fd) [1] (./test.aux) ) Output written on test.pdf (1 page). Transcript written on test.log.

satanaileo commented 4 months ago

Can you compile with xelatex in command line?

Sorry for making this issue, I've tried my test.tex can be compiled successfully.