我在 Asymptote 中编译了一个文件。作为一个最小的工作示例,考虑任何必须标记点的东西,例如
settings.outformat="pdf";
dot("$A$", (0,0));
它吐出错误
Unfortunately, the package miktex-dvips-base could not be installed.Please check the log file:
C:/Users/.../AppData/Local/MiKTeX/2.9/miktex/log/dvips.log
C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\dvips.exe: ! Couldn't find header file: tex.pro
C:\Program Files (x86)\Asymptote/plain_shipout.asy: 87.10: runtime: shipout failed
[Finished in 14.2s]
日志文件显示如下:
2017-01-03 18:05:03,374+0800 INFO dvips - installing package miktex-dvips-base triggered by dvips\base\tex.pro
2017-01-03 18:05:05,623+0800 INFO dvips - mpm: starting package maintenance...
2017-01-03 18:05:05,623+0800 INFO dvips - mpm: installation directory: "C:\Program Files (x86)\MiKTeX 2.9"
2017-01-03 18:05:05,623+0800 INFO dvips - mpm: package repository: ftp://ftp.u-aizu.ac. jp/pub/tex/CTAN/systems/win32/miktex/tm/packages/next/
2017-01-03 18:05:06,040+0800 INFO dvips - mpm: lightweight database digest: 8b7e5e14ebc0805350eddfca3bbc71bc
2017-01-03 18:05:06,106+0800 FATAL dvips - Unknown archive file size.
2017-01-03 18:05:06,106+0800 FATAL dvips - Info: package="miktex-dvips-base"
2017-01-03 18:05:06,106+0800 FATAL dvips - Source: libraries\miktex\packagemanager\internal.h
2017-01-03 18:05:06,107+0800 FATAL dvips - Line: 483
当我打开 mpm 并尝试手动安装包时(是的,我尝试刷新 FNDB、更新格式、同步等),它会出现相同的错误:
MiKTeX Problem Report
Message: Unknown archive file size.
Data: package="miktex-dvips-base"
Source: libraries\miktex\packagemanager\internal.h
Line: 483
MiKTeX: 2.9
OS: Windows 7 Professional, 64-bit, build 7600
Invokers: explorer/mo
SystemAdmin: yes
PowerUser: no
Root0: C:\Users\...\AppData\Roaming\MiKTeX\2.9
Root1: C:\Users\...\AppData\Local\MiKTeX\2.9
Root2: D:\Documents\tex\root
Root3: C:\ProgramData\MiKTeX\2.9
Root4: C:\Program Files (x86)\MiKTeX 2.9
UserInstall: C:\Users\...\AppData\Roaming\MiKTeX\2.9
UserConfig: C:\Users\...\AppData\Roaming\MiKTeX\2.9
UserData: C:\Users\...\AppData\Local\MiKTeX\2.9
CommonInstall: C:\Program Files (x86)\MiKTeX 2.9
CommonConfig: C:\ProgramData\MiKTeX\2.9
CommonData: C:\ProgramData\MiKTeX\2.9
我尝试miktex-dvips-base
手动安装,但找不到该文件。它似乎已被弃用,如果是这样,我该如何让 Asymptote 不必依赖该文件?
答案1
已修复 – 解决方案是安装包dvips
。我同步了我的离线数据库并dvips
使用 mpm 安装。