![由于缺少“translator.sty”,无法在 Windows 上使用 beamer 包](https://linux22.com/image/355492/%E7%94%B1%E4%BA%8E%E7%BC%BA%E5%B0%91%E2%80%9Ctranslator.sty%E2%80%9D%EF%BC%8C%E6%97%A0%E6%B3%95%E5%9C%A8%20Windows%20%E4%B8%8A%E4%BD%BF%E7%94%A8%20beamer%20%E5%8C%85.png)
我正在尝试在 Windows 上使用 Beamer 编译演示文稿。但是,即使是最简单的示例演示文稿也会中止。相反,我被告知:
starting package maintenance...
installation directory: C:\Users\admin\AppData\Roaming\MiKTeX\2.9
package repository: http://mirror.physik-pool.tu-berlin.de/tex-archive/systems/win32/miktex/tm/packages/
lightweight database digest: 3a990fd9300abc5d0d8c99b2064abddb
going to download 2628706 bytes
going to install 346 file(s) (1 package(s))
downloading http://mirror.physik-pool.tu-berlin.de/tex-archive/systems/win32 /miktex/tm/packages/beamer.tar.lzma...
2628706 bytes, 282.04 KB/Sec
extracting files from beamer.tar.lzma...
Unfortunately, the package beamer could not be installed.Please check the log file:
C:/Users/admin/AppData/Local/MiKTeX/2.9/miktex/log/pdflatex.log
======================================================================
日志文件显示:
2017-05-24 13:40:57,040+0200 FATAL pdflatex - Info: path="C:\Users\admin\AppData\Roaming\MiKTeX\2.9\tex/latex/beamer/beamer.cls"
2017-05-24 13:40:57,040+0200 FATAL pdflatex - Source: Libraries\MiKTeX\Core\File\win\winFile.cpp
2017-05-24 13:40:57,040+0200 FATAL pdflatex - Line: 286
2017-05-24 13:41:44,697+0200 INFO pdflatex - installing package beamer triggered by tex\latex\beamer\translator\translator.sty
2017-05-24 13:41:48,400+0200 INFO pdflatex - mpm: starting package maintenance...
2017-05-24 13:41:48,400+0200 INFO pdflatex - mpm: installation directory: C:\Users\admin\AppData\Roaming\MiKTeX\2.9
2017-05-24 13:41:48,400+0200 INFO pdflatex - mpm: package repository: ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/
2017-05-24 13:41:48,633+0200 INFO pdflatex - mpm: lightweight database digest: 3a990fd9300abc5d0d8c99b2064abddb
2017-05-24 13:41:48,649+0200 INFO pdflatex - mpm: going to download 2628706 bytes
2017-05-24 13:41:48,649+0200 INFO pdflatex - mpm: going to install 346 file(s) (1 package(s))
2017-05-24 13:41:48,655+0200 INFO pdflatex - mpm: downloading ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/beamer.tar.lzma...
2017-05-24 13:41:57,484+0200 INFO pdflatex - mpm: 2628706 bytes, 290.95 KB/Sec
2017-05-24 13:41:57,504+0200 INFO pdflatex - mpm: extracting files from beamer.tar.lzma...
2017-05-24 13:41:58,245+0200 FATAL pdflatex - Windows API error 32: The process cannot access the file because it is being used by another process.
2017-05-24 13:41:58,245+0200 FATAL pdflatex - Info: path="C:\Users\admin\AppData\Roaming\MiKTeX\2.9\tex/latex/beamer/beamer.cls"
2017-05-24 13:41:58,245+0200 FATAL pdflatex - Source: Libraries\MiKTeX\Core\File\win\winFile.cpp
2017-05-24 13:41:58,245+0200 FATAL pdflatex - Line: 286
这里到底发生了什么,如何在 Windows 上使用 beamer 包?
答案1
转换Ulrike Fischers 评论变成 CW 答案:
某些东西阻止了软件包中的文件。关闭所有内容(例如打开文档的 pdf 查看器)。然后启动软件包管理器,同步(菜单存储库)并尝试从那里安装软件包。
答案2
在 Windows 中,转到所有程序,然后转到 Miktex 2.9,然后转到维护(管理员),然后转到 Miktex Packet Manager(管理员)。在列名下选择 beamer。然后在左上角选择 +。在列名下选择 translator。然后在左上角选择 +。
答案3
我在全新安装 MikTeX(2018-11-21)时遇到了类似的问题。
2018-11-21 13:24:10,856+0100 INFO pdflatex - mpm: extracting files from beamer.tar.lzma...
2018-11-21 13:24:12,924+0100 FATAL pdflatex - The installed file does not exist.
2018-11-21 13:24:12,925+0100 FATAL pdflatex - Info: fileName="C:\Program Files\MiKTeX 2.9\tex\latex\beamer\translator\translator.sty"
2018-11-21 13:24:12,925+0100 FATAL pdflatex - Source: Libraries\MiKTeX\Core\Session\findfile.cpp
2018-11-21 13:24:12,925+0100 FATAL pdflatex - Line: 59
我通过手动安装translator
MikTeX Update(管理员)工具中的包解决了这个问题。
答案4
我检查了 MikTex,发现已经安装了软件包。我退出了 Latex 编辑器 (TexStudio),以管理员身份重新启动它,然后一切都按预期运行。