(La)TeX suddenly can't find anything

Matthew Saltzman mjs at clemson.edu
Fri Feb 13 14:43:34 UTC 2015


On Thu, 2015-02-12 at 19:39 +0100, Andras Simon wrote:
> 2015-02-12 14:28 GMT+01:00, Marko Vojinovic <vvmarko at gmail.com>:
> > On Wed, 11 Feb 2015 23:24:40 +0100
> > Andras Simon <szajmi at gmail.com> wrote:
> >
> >> I've been using LaTeX on a fully updated Fedora 21, but now suddenly
> >> even TeXing the simplest plain TeX file produces this:
> >>
> >> warning: kpathsea: /usr/share/texlive/texmf-config/ls-R: No usable
> >> entries in ls-R.
> >> warning: kpathsea: See the manual for how to generate ls-R.
> >
> > //  Rule number one for anything TeX-related: before you proceed, make
> > sure that you understand what is going on. ;-)  //
> 
> Yep, that's why I never proceed :-)
> 
> > The warning messages are pretty clear: kpathsea is telling you that the
> > ls-R database is empty or corrupted, and that it should be regenerated.
> > It also suggests that you look into the manual about how to regenerate
> > the database.
> >
> > The easiest way to find the relevant man page is this:
> >
> > $ apropos ls-R
> > mktexlsr (1)         - create ls-R databases
> > texhash (1)          - create ls-R databases
> >
> > These two man pages actually both point to the mktexlsr man page, which
> > tells you how to use it to regenerate the ls-R database. In short, you
> > need to log in as root, and invoke mktexlsr with no arguments, like
> > this:
> >
> > # mktexlsr
> > mktexlsr: Updating /usr/share/texlive/texmf-config/ls-R...
> > mktexlsr: Updating /usr/share/texlive/texmf-dist/ls-R...
> > mktexlsr: Updating /usr/share/texlive/texmf-local///ls-R...
> > mktexlsr: Updating /usr/share/texlive/texmf-var/ls-R...
> > mktexlsr: Done.
> >
> > Hopefully that should regenerate the ls-R database on your system,
> > making kpathsea happy.
> >
> > By the way, the ls-R database is the list of full paths of all
> > TeX-related files. A long long time ago in a galaxy far far away it used
> > to be generated manually by executing the command "ls -R" for a given
> > directory and putting the result in the (creatively named) ls-R file,
> > which kpathsea could search through and inform TeX where in the
> > directory tree it can find the file it needs. Today, the database is
> > generated by the elaborate bash script (do a "less /usr/bin/mktexlsr"
> > to see the details), but it still boils down to going to the
> > appropriate directory and taking the output of "ls -R".
> >
> > Finally, all four ls-R databases which I have above are ASCII files,
> > literally the output of "ls -R" for the appropriate directory, with a
> > couple of lines appended at the beginning. So the fact that you have
> > binary files there smells to me like something being very wrong with
> > your files, probably due to the corrupted filesystem you had to deal
> > with before.
> 
> Thanks for all this information. I ended up following another
> Fedoran's suggestion, and erased/reinstalled all texlive packages.
> (Plain dnf reinstall, which I had tried before, was not enough.)

For future reference, a handy tool for working with the TeXLive setup is
texconfig (for user's personal setup) and texconfig-sys (for system-wide
setup).  It has a REHASH option for rebuilding the ls-R database as well
as options for paper type in TeX, xdvi, and dvips, and other setup
matters.

> 
> Andras
> 

-- 
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu


More information about the users mailing list