Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
Your MWE runs without any problem on my MiKTeX 2.9 system. Please add \listfiles before \documentclass{article} And have a look for the version of hyperref and/or url. Add the resulting list at the end of the log file in your question. –  Kurt Dec 1 '12 at 22:20
@Kurt: I have edited the question to include the information you mentioned. –  abhinavkulkarni Dec 1 '12 at 22:34
Your pdftex says "Debian" at the start. Are you sure that it is from the fresh Texlive and not from another TeX? –  Ulrike Fischer Dec 1 '12 at 22:53
Sorry but I doubt that the log is from a fresh Texlive. E.g. The hyperref version looks to old. –  Ulrike Fischer Dec 1 '12 at 23:19
@UlrikeFischer: You are correct. I had installed 'Gummi', a LaTeX editor that must have installed all the other dependencies to compile and view LaTeX documents. I checked I have latex in /usr/bin/ that must have been installed by Gummi or some other program`. /usr/bin/ is earlier in PATH than /usr/local/texlive/2012/bin/i386-linux, hence it was picking up pdflatex from the earlier path. However, what I am surprised by is that I never installed texlive from synaptic/software center. How come even the basic document got compiled? –  abhinavkulkarni Dec 1 '12 at 23:52
show 3 more comments

closed as too localized by egreg, Paul Gaborit, Guido, Kurt, Werner Dec 2 '12 at 6:31

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 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.

share|improve this answer
I regenerated ls-R, however the output of find command is still empty. ls-R after regeneration does not contain the two lines you mentioned. BTW, I freshly installed TexLive 2012 this morning. –  abhinavkulkarni Dec 1 '12 at 22:30
@abhinavkulkarni Can you reinstall the package? –  Heiko Oberdiek Dec 1 '12 at 22:45
@HeikoOverdiek: I tried that as well using command sudo tlmgr install --reinstall url, however no success. –  abhinavkulkarni Dec 1 '12 at 22:48
@abhinavkulkarni I have added a section for manual installation, because I am not an expert for tlmgr. And without its output, logs, there is not much information to work with. –  Heiko Oberdiek Dec 1 '12 at 23:11
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.