MiKTeX:缺少文件 hyperref.cfg

MiKTeX:缺少文件 hyperref.cfg

更新我的 MiKTeX 安装(日期为 2020-01-29)后,我无法编译我的 LaTeX 文件。

这是我的 MWE:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\href{www.google.com}{Google}
\end{document}

如果我尝试使用它来编译,pdflatex Test.tex我会在命令行上得到以下输出:

...
...
("C:\Program Files\MiKTeX2.9\tex/generic/intcalc\intcalc.sty")
("C:\Program Files\MiKTeX2.9\tex/generic/etexcmds\etexcmds.sty")

过了一会儿,MiKTeX 包安装对话框弹出,显示以下消息:

The required file
  tex/latex/00miktex/hyperref.cfg
is missing. It is part of the following package:
  miktex-latex

单击Install命令行上的输出后继续

======================================================================
starting package maintenance...
installation directory: "C:\Program Files\MiKTeX2.9"
package repository: C:/Installation/LaTeX/MiKTeX/Repository
package repository digest: 498d1111335cf2fa3fddb12ad2aee195
going to install 4 file(s) (1 package(s))
extracting files from miktex-latex.tar.lzma...
======================================================================

Sorry, but pdflatex did not succeed.

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

  C:\Users\xxxx\AppData\Local\MiKTeX\2.9\miktex\log\pdflatex.log

日志文件包含以下内容:

INFO  pdflatex - starting with command line: pdflatex Test.tex
WARN  pdflatex - running with administrator privileges
INFO  pdflatex - allowing known shell commands
INFO  pdflatex - enabling input (output) from (to) processes
INFO  pdflatex - installing package miktex-latex triggered by tex/latex/00miktex\hyperref.cfg
INFO  pdflatex - mpm: starting package maintenance...
INFO  pdflatex - mpm: installation directory: "C:\Program Files\MiKTeX2.9"
INFO  pdflatex - mpm: package repository: C:/Installation/LaTeX/MiKTeX/Repository
INFO  pdflatex - mpm: package repository digest: 498d1111335cf2fa3fddb12ad2aee195
INFO  pdflatex - mpm: going to install 4 file(s) (1 package(s))
INFO  pdflatex - mpm: extracting files from miktex-latex.tar.lzma...
FATAL pdflatex - The installed file does not exist.
FATAL pdflatex - Info: fileName="C:\Program Files\MiKTeX2.9\tex/latex/00miktex\hyperref.cfg"
FATAL pdflatex - Source: Libraries\MiKTeX\Core\Session\findfile.cpp
FATAL pdflatex - Line: 59
INFO  pdflatex - finishing with exit code 1

有趣的是,存储库文件miktex-latex.tar.lzma仅包含 3 个文件,分别是:

texmf/tex/latex/00miktex/latex.ini
texmf/tex/latex/00miktex/pdflatex.ini
texmf/tpm/packages/miktex-latex.tpm

在我仍然拥有的旧版本存储库(2020-01-21)中,有 4 个文件miktex-latex.tar.lzma

texmf/tex/latex/00miktex/hyperref.cfg
texmf/tex/latex/00miktex/latex.ini
texmf/tex/latex/00miktex/pdflatex.ini
texmf/tpm/packages/miktex-latex.tpm

因此,显然 MiKTeX 会尝试安装/更新一个本hyperref.cfg应位于 中的文件miktex-latex.tar.lzma。但自 2020-01-22 起,该文件已不复存在。

我也尝试全新安装 MiKTeX,但结果相同。

顺便说一句,使用 2020-01-29 的存储库需要应用 Ulrike 的解决方案未找到文件 hycolor.sty

答案1

Tasks / Update package database可以通过使用和更新包数据库来解决该问题Tasks / Refresh file name database

解决方案归功于“daleif”。谢谢。

相关内容