跳转到内容
Go back

GitHub Actions 打包 Tinytex 环境报错记录

更新于:

GitHub Actions 打包 Tinytex 环境报错记录

使用 GitHub Actions 打包环境时,在安装完成 tinytex 之后,使用 tlmgr 更新包时会报错,报错详情如下:

 Installing 'tinytex' (2024.11) [64bit] from 'r-bucket' bucket
Starting download with aria2 ...
Download: [#5829f6 0B/109MiB(0%) CN:1 DL:0B]                                                                  
Download: Download Results:                                                                                   
Download: gid   |stat|avg speed  |path/URI                                                                    
Download: ======+====+===========+=======================================================                     
Download: 5829f6|OK  |    64MiB/s|C:/00PackageManager/Scoop/cache/tinytex#2024.11#86eabcc.zip                 
Download: Status Legend:                                                                                      
Download: (OK):download completed.                                                                            
Checking hash of TinyTeX-1-v2024.11.zip ... ok.
Extracting TinyTeX-1-v2024.11.zip ... done.
Running pre_install script...done.
Linking C:\00PackageManager\Scoop\apps\tinytex\current => C:\00PackageManager\Scoop\apps\tinytex\2024.11
Running post_install script...--> Running tlmgr path add
--> Updating tlmgr itself
tlmgr.pl: package repository https://ctan.math.illinois.edu/systems/texlive/tlnet (verified)
tlmgr.pl: no self-updates for tlmgr available
done.
'tinytex' (2024.11) was installed successfully!
Notes
-----
For full documentation, see https://yihui.org/tinytex/
tlmgr: D:\a\_temp\22a1af43-7f91-4c2f-82d0-069cb108fd48.ps1:4
Line |
   4 |  tlmgr update --self --all
     |  ~~~~~
     | The term 'tlmgr' is not recognized as a name of a cmdlet, function, script file, or executable program. Check
     | the spelling of the name, or if a path was included, verify that the path is correct and try again.
Error: Process completed with exit code 1.

出现错误的地方:

建议的修复步骤:

  1. 在运行 tlmgr 之前添加以下命令刷新环境变量:
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
  1. 或者使用完整路径运行 tlmgr:
C:\00PackageManager\Scoop\apps\tinytex\current\bin\windows\tlmgr update --self --all

参考资料


分享文章至:

Previous Post
更新全部 Python 包
Next Post
线上故障应急处理:4 年多 on Call 经验总结