Windows Server 2019环境下TinyTeX安装失败的问题求助
It looks like you’ve hit a few frustrating roadblocks installing TinyTeX, even after trying multiple common methods. Let’s break down the issues and walk through targeted fixes tailored to your setup.
What You’ve Tried & The Errors You Encountered
You tested three installation paths, all resulting in failures:
Using
tinytex::install_tinytex(): DownloadedTinyTeX-0.zipbut ran into two critical issues:Error in system2("tlmgr", args, ...) : "tlmgr" not foundPlus this warning about zip extraction failure:
In extract(pkg, exdir = path.expand(target)) : error 1 in extracting from zip fileManual download +
tinytex:::install_prebuilt(): Got the exact same error and warning as the first method.Manual unzip + running
install-tl-windows.bat: The console closed immediately after showing this key message:'\\crc\users\etienne\Desktop\TinyTeX-0\TinyTeX' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
After all attempts, tinytex::is_tinytex() returns FALSE and tinytex::tlmgr_path() produces no output—confirming TinyTeX isn’t properly installed or recognized by R.
Your System Details
- OS: Windows Server 2019 Standard (Version 1809, build 17763)
- R version: 4.1.0 (2021-05-18)
- Loaded packages:
tinytex_0.33.1,xfun_0.25, plus base R tools
Fixes to Try (Ordered by Priority)
1. Move TinyTeX to a Local Drive (Fix the UNC Path Issue)
The biggest red flag here is the UNC path error in Method 3. Windows CMD doesn’t support running batch files from network paths like \\crc\users\etienne\Desktop.... Here’s how to resolve this:
- Copy your downloaded
TinyTeX-0.zipto a local directory (e.g.,C:\Temp\TinyTeX—avoid network locations entirely). - Extract the zip file to this local folder.
- Double-click
install-tl-windows.batfrom the local path. This should let the installer run without the UNC restriction.
2. Fix Zip Extraction & Permission Issues for R-Based Installs
The extraction warning in Methods 1 and 2 suggests either a corrupted zip file or permission conflicts. Try these steps:
- Re-download
TinyTeX-0.zipto ensure it wasn’t damaged during the initial download. - Run R as Administrator before trying
tinytex::install_tinytex()ortinytex:::install_prebuilt(). This gives R the necessary permissions to write to system directories. - Specify a local installation directory explicitly using the
dirparameter, like this:
This bypasses network paths and reduces permission-related errors.tinytex::install_tinytex(dir = "C:\\TinyTeX")
3. Verify tlmgr is in Your System PATH
If you get TinyTeX installed but R still can’t find tlmgr, check if the tool is added to your Windows PATH:
- Open a new Command Prompt (not R) and run
tlmgr --version. If it returns version info, the path is set correctly. - If not, manually add the TinyTeX
bindirectory (e.g.,C:\TinyTeX\bin\win32) to your Windows System PATH. Restart R after making this change, then runtinytex::is_tinytex()again.
4. Check for Windows Server Security Restrictions
Windows Server 2019 often has stricter group policies or antivirus rules that can block installations. Make sure:
- You have full administrative privileges on the server.
- Your antivirus software isn’t blocking the extraction or execution of the TinyTeX installer.
- The Windows Installer service is running (check via
Services.msc).
内容的提问来源于stack exchange,提问作者bretauv

