An avid user of hyperref package here. I had been using it for almost all of my documents, and it had been working just fine, until today, when all of a sudden, all my files that have


in them, began showing this error while compiling:

File `uniquecounter.sty' not found. \RequirePackage{uniquecounter}[2009/12/18]

What could be causing the problem here? How can I fix that?

I use TeXstudio and MiKTex on Windows 11. I did not do any tinkering (reinstalling, updating, etc.) with these before or after the error appeared.

Minimum example that illustrates my problem:


    \section{Section 1}\label{sec 1}
    In Section \ref{sec 1}, ...

The log file:

This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.3) (preloaded format=pdflatex 2022.3.31)  6 APR 2022 17:53
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-02-24>
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\size10.clo
File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/hyperref\hyperref
Package: hyperref 2022-02-21 v7.00n Hypertext links for LaTeX

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/ltxcmds\ltxcmds
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/iftex\iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/pdftexcmds\pdft
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/infwarerr\infwa
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\keyval.s
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/kvsetkeys\kvset
Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/kvdefinekeys\kv
Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/pdfescape\pdfes
Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/hycolor\hycolor.s
Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/letltxmacro\letlt
Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/auxhook\auxhook.s
Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/kvoptions\kvoptio
Package: kvoptions 2020-10-07 v3.14 Key value format for package options (HO)

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/hyperref\pd1enc.d
File: pd1enc.def 2022-02-21 v7.00n Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/intcalc\intcalc
Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO)
(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/etexcmds\etexcm
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/hyperref\puenc.de
File: puenc.def 2022-02-21 v7.00n Hyperref: PDF Unicode definition (HO)
Now handling font encoding PU ...
... no UTF-8 mapping file for font encoding PU
Package hyperref Info: Hyper figures OFF on input line 4137.
Package hyperref Info: Link nesting OFF on input line 4142.
Package hyperref Info: Hyper index ON on input line 4145.
Package hyperref Info: Plain pages OFF on input line 4152.
Package hyperref Info: Backreferencing OFF on input line 4157.
Package hyperref Info: Implicit mode ON; LaTeX internals redefined.
Package hyperref Info: Bookmarks ON on input line 4390.
 (C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/url\url.sty
Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
LaTeX Info: Redefining \url on input line 4749.

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/bitset\bitset.s
Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO)

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/generic/bigintcalc\bigi
Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO
Package hyperref Info: Hyper figures OFF on input line 6027.
Package hyperref Info: Link nesting OFF on input line 6032.
Package hyperref Info: Hyper index ON on input line 6035.
Package hyperref Info: backreferencing OFF on input line 6042.
Package hyperref Info: Link coloring OFF on input line 6047.
Package hyperref Info: Link coloring with OCG OFF on input line 6052.
Package hyperref Info: PDF/A mode OFF on input line 6057.
LaTeX Info: Redefining \ref on input line 6097.
LaTeX Info: Redefining \pageref on input line 6101.

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\atbegshi-ltx
Package: atbegshi-ltx 2021/01/10 v1.0c Emulation of the original atbegshi
package with kernel methods
Package hyperref Info: Driver (autodetected): hpdftex.

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/hyperref\hpdftex.
File: hpdftex.def 2022-02-21 v7.00n Hyperref driver for pdfTeX

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\atveryend-lt
Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atveryend pac
with kernel methods

(C:\Users\Sarthak\AppData\Local\Programs\MiKTeX 2.9\tex/latex/rerunfilecheck\re
Package: rerunfilecheck 2019/12/05 v1.9 Rerun checks for auxiliary files (HO)

! LaTeX Error: File `uniquecounter.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
l.271 \RequirePackage{uniquecounter}[2009/12/18]
*** (cannot \read from terminal in nonstop modes)

Here is how much of TeX's memory you used:
 6737 strings out of 478571
 105054 string characters out of 2841014
 392036 words of memory out of 3000000
 24928 multiletter control sequences out of 15000+600000
 469259 words of font info for 28 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 59i,0n,63p,199b,36s stack positions out of 10000i,1000n,20000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!
  • 1
    show a small complete example and the complete log file. Apr 6, 2022 at 12:08
  • 2
    hm, I don't know how you managed it but you seem to have lost the package. Go to the miktex console and try to install / reinstall uniquecounter. Apr 6, 2022 at 12:38
  • @UlrikeFischer You saved the day! Thanks. If you can post it as an answer, I'll accept it.
    – Atom
    Apr 6, 2022 at 12:45

1 Answer 1


For an unknown reason you lost the uniquecounter package. Install/reinstall it in the miktex console.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .