[Tex/LaTex] URL package installed but cannot be found by pdflatex


I recently installed a full version of TeXLive 2012 (around 3.2 GB installation). Following is a simple LaTeX code that I am unable to compile:


\title{\LaTeX\ Document}
\author{Joe the Student}
   Hello world!
   My email is \href{mailto:my_email@server.org}{my\_email@server.org}

I get following error when I try to compile with pdflatex:

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class

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

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

Enter file name: 

Package hyperref Message: Driver (autodetected): hpdftex.

(./tex.aux) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(./tex.out) (./tex.out) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]

*File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
hyperref.sty    2012/05/13 v6.82q Hypertext links for LaTeX
hobsub-hyperref.sty    2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2012/05/28 v1.13 Construct package bundles (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)
  bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
 hopatch.sty    2012/05/28 v1.2 Wrapper for package hooks (HO)
xcolor-patch.sty    2011/01/30 xcolor patch
atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)
 hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
  pd1enc.def    2012/05/13 v6.82q Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
 hpdftex.def    2012/05/13 v6.82q Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
 nameref.sty    2010/04/30 v2.40 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)

    Output written on tex.pdf (1 page, 34458 bytes).
    Transcript written on tex.log.

Compilation halts at the prompt:

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

Enter file name:

and then proceeds and does create the pdf as expected.
However I don't understand why I get the compilation error in the first place.

I successfully verified that packages hyperref and url are installed using command:

tlmgr show <pkg-name>

However, I read somewhere that url is part of ltxmisc and output of

ls /usr/share/texlive/texmf-dist/tex/latex/ltxmisc/ 

has url.sty missing.

Please let me know what could be wrong.

Best Answer

url.sty is part of TeX Live package url and is installed as


If the file is present, it should be listed in


with the two lines:


If not, then regenerate ls-R by running texhash /usr/share/texlive as user root (as user that has permissions for /usr/share/texlive/).

If the file url.sty is missing in this location, then you can try

$ find /usr/share/texlive/texmf-dist/ -name url.sty

to locate it.

Manual installation

CTAN:macros/latex/contrib/url/ contains the files for package url. They should be sorted into the following texmf/TDS locations:

TDS:doc/latex/url/miscdoc.sty TDS:doc/latex/url/url.pdf TDS:doc/latex/url/url.tex TDS:tex/latex/url/url.sty

Usually additional packages are installed in the local or home texmf tree. In this case, however, it would put them into the distribution tree:

TDS: ≡ /usr/share/texlive/texmf-dist/

The run texhash again.

I do not know your, why your full install misses the url package or why it cannot be reinstalled. Enable verbose/debug options for tlmgr if available and post the output, perhaps someone can see the reason. There is also a mailing list texlive for problems/bug reports regarding tlmgr.