[Tex/LaTex] Hyperref / Hpdftex failure to compile

hyperref

I have TeX Live installed (and all packages updated), but run into problems with the hyperref package when I run pdfTeX. I can compile documents without using the hyperref package without problems.

The error message starts with the following:

* hyperref using default driver hpdftex *

(/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hpdftex.def
File: hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX

/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hpdftex.def:34: Undefined
control sequence.

l.34 \Hy@VersionCheck
                 {hpdftex.def}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

… and continues from there, with repeated errors regarding subsequent control sequences. I've tried compiling without using other packages to eliminate potential conflicts, and still get the error message. I get the error message for article or beamer document class.

Best Answer

Broken installation

\Hy@VersionCheck is defined in hyperref.sty of version 2010-10-19 v6.81s and later. The driver file of your error message log has version 2012/11/06 v6.83m.

The versions of the package file hyperref.sty and its driver files *.def must match. Check your .log file, where your hyperref.sty comes from and which version is has.

If the file is found as /usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hyperref.sty with an outdated version, then the installation is broken and needs to be fixed.

If the .log file shows a stray outdated hyperref.sty, which is found before the correct hyperref.sty, then you have move (or delete) the outdated file away.

Wrong loading

The driver file hpdftex.def is supposed to be loaded by hyperref. There is no option hpdftex, therefore it must not be used as option for other packages such as inputenc (wrong: \usepackage[hpdftex]{inputenc}) and should not be loaded on its own (wrong: \input{hpdftex.def}).