MiKTeX 包管理器随机失败

MiKTeX 包管理器随机失败

我正在开发一个歌本编辑软件,正在 AppVeyor(Windows 环境)上自动测试。

在测试我的软件之前,AppVeyor 需要安装 MikTex 和一些软件包:我通过以下方式完成此操作平均每分钟程序。MikTex 安装运行良好。

我的问题是软件包安装有时成功(后来的失败是由于我的软件造成的)有时失败

我没有在日志中看到任何可以解释这种行为的差异(如下所述)(也许下载时间除外?)。还有其他方法可以调试此命令吗?(我已经使用了--verbose


在线差异(右侧为成功)

正在安装的软件包列表

成功

> wget https://raw.githubusercontent.com/patacrep/patacrep/master/texlive_packages.txt -OutFile ./texlive_packages.txt
> mpm.exe --install-some texlive_packages.txt --verbose
starting package maintenance...
installation directory: C:\projects\patadata-pdf\miktex
package repository: http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/
lightweight database digest: f607defbb276c3ae395deb5e62cd67b4
going to download 33499406 bytes
going to install 996 file(s) (20 package(s))
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-esperanto.tar.lzma...
135549 bytes, 214.89 KB/Sec
extracting files from babel-esperanto.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-italian.tar.lzma...
402582 bytes, 158.46 KB/Sec
extracting files from babel-italian.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-latin.tar.lzma...
172531 bytes, 1178.23 KB/Sec
extracting files from babel-latin.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-portuges.tar.lzma...
156215 bytes, 72.68 KB/Sec
extracting files from babel-portuges.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/ctablestack.tar.lzma...
155555 bytes, 449.44 KB/Sec
extracting files from ctablestack.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/etoolbox.tar.lzma...
239683 bytes, 1000.28 KB/Sec
extracting files from etoolbox.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/fancybox.tar.lzma...
285651 bytes, 118.05 KB/Sec
extracting files from fancybox.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/framed.tar.lzma...
248224 bytes, 1132.74 KB/Sec
extracting files from framed.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/import.tar.lzma...
247964 bytes, 74.67 KB/Sec
extracting files from import.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3kernel.tar.lzma...
6909660 bytes, 643.25 KB/Sec
visiting repository http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/...
repository type: remote package repository
loading lightweight database...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma...
161005 bytes, 831.91 KB/Sec
lightweight database digest: 3ffca9751ff8045ec1ad3838d8c2c4bf
extracting files from l3kernel.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3packages.tar.lzma...
1572595 bytes, 265.74 KB/Sec
extracting files from l3packages.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/mptopdf.tar.lzma...
37051 bytes, 229.00 KB/Sec
extracting files from mptopdf.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/ms.tar.lzma...
2102632 bytes, 321.54 KB/Sec
extracting files from ms.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/newunicodechar.tar.lzma...
398760 bytes, 591.81 KB/Sec
extracting files from newunicodechar.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/pgf.tar.lzma...
10594095 bytes, 521.78 KB/Sec
extracting files from pgf.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/tipa.tar.lzma...
8096508 bytes, 1053.39 KB/Sec
extracting files from tipa.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/unicode-data.tar.lzma...
215890 bytes, 276.32 KB/Sec
extracting files from unicode-data.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/url.tar.lzma...
273472 bytes, 1019.32 KB/Sec
extracting files from url.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/xcolor.tar.bz2...
753530 bytes, 150.36 KB/Sec
extracting files from xcolor.tar.bz2...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/xstring.tar.lzma...
493014 bytes, 172.32 KB/Sec
extracting files from xstring.tar.lzma...
20 packages have been successfully installed.
wget https://github.com/patacrep/patadata/archive/yaml.zip -OutFile ./patadata.zip
7z x patadata.zip * -aot -opatadata > nul
songbook patadata\patadata-yaml\books\songbook -v
ERROR:root:No such file or directory: 'patadata\\patadata-yaml\\books\\songbook'
Command exited with code 1

失败

> wget https://raw.githubusercontent.com/patacrep/patacrep/master/texlive_packages.txt -OutFile ./texlive_packages.txt
> mpm.exe --install-some texlive_packages.txt --verbose
starting package maintenance...
installation directory: C:\projects\patadata-pdf\miktex
package repository: http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/
lightweight database digest: f607defbb276c3ae395deb5e62cd67b4
going to download 33499406 bytes
going to install 996 file(s) (20 package(s))
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-esperanto.tar.lzma...
135549 bytes, 183.60 KB/Sec
extracting files from babel-esperanto.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-italian.tar.lzma...
402582 bytes, 1095.12 KB/Sec
extracting files from babel-italian.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-latin.tar.lzma...
172531 bytes, 1347.90 KB/Sec
extracting files from babel-latin.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-portuges.tar.lzma...
156215 bytes, 1250.44 KB/Sec
extracting files from babel-portuges.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/ctablestack.tar.lzma...
155555 bytes, 60.14 KB/Sec
extracting files from ctablestack.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/etoolbox.tar.lzma...
239683 bytes, 848.06 KB/Sec
extracting files from etoolbox.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/fancybox.tar.lzma...
285651 bytes, 97.27 KB/Sec
extracting files from fancybox.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/framed.tar.lzma...
248224 bytes, 361.80 KB/Sec
extracting files from framed.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/import.tar.lzma...
247964 bytes, 1337.86 KB/Sec
extracting files from import.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3kernel.tar.lzma...
6909660 bytes, 816.82 KB/Sec
visiting repository http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/...
repository type: remote package repository
loading lightweight database...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma...
161005 bytes, 421.53 KB/Sec
lightweight database digest: 3ffca9751ff8045ec1ad3838d8c2c4bf
extracting files from l3kernel.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3packages.tar.lzma...

Sorry, but "MiKTeX Package Manager" did not succeed.


The log file hopefully contains the information to get MiKTeX going again:



C:/projects/patadata-pdf/miktex/miktex/log/mpmcli.log


You may want to visit the MiKTeX project page, if you need help.

Command exited with code 1

答案1

您可以在此处看到相关错误:

downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3packages.tar.lzma...

Sorry, but "MiKTeX Package Manager" did not succeed.

由于无法完成下载,因此此处的安装失败。

没有给出原因,但通常是因为服务器超载或者你的互联网连接非常慢或者破碎的

当我告诉我的学生如何安装/更新 MiKTeX 时,我总是告诉他们这种安装/更新中断是可能发生的。然后只需重新启动该过程即可。重新启动的过程会识别已安装的新软件包并继续使用非当前软件包。我的一个学生不得不重新启动安装过程 13 次,因为他使用的网络连接非常差……

相关内容