TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently installed Ubuntu 12.04 (default, no tweaking) and I am trying to use pdfLaTeX, like this:

  1. the file z.tex exists
  2. I am in the directory containing z.tex
  3. TEXINPUTS is a shell variable set to .:~/tex:: (seems correct and works on other machines with other Ubuntu versions)

Trying to run latex, pdflatex or pdftex gets the same message:

I can't find file 'z.tex'

Does anyone understand that? What did I forget?

share|improve this question
The last : in your value (.:~/tex::) is useless. The value .:~/tex: gives the same result (an empty directory name in your list of directories). – Paul Gaborit Jan 2 '13 at 11:25
I learned long ago that and empty path element in TEXINPUTS inserts the existing value of TEXINPUTS at that point, so that you preserve the old values and add other paths to it. Maybe this is not true anymore. In any case, correcting it from :: to : did not change the result. :( – joao oliveira Jan 2 '13 at 11:37
First, check if the file is found with kpsewhich z.tex If this does not return anything, type kpsewhich -d 32 z.tex – with the debug flags tug.org/texinfohtml/kpathsea.html#Debugging – to see where the file is looked for. It should return something as [file z.tex] … => found. If nothing is found, and the looking path seems good, maybe you need to set another variable (I would recommend in any case to always put such compilation variable in a texmf.cnf) – RD6137 Jan 2 '13 at 11:37
There's never a need to add the current directory in TEXINPUTS, because it's always looked at first. – egreg Jan 2 '13 at 11:42
Welcome to TeX.sx! We usually do not include greetings or thanks in the questions. Please visit the faq and meta.tex.stackexchange.com/q/1436/19384 for more information on the site. – Peter Jansson Jan 2 '13 at 11:44

Solved: it was not a tex-related problem.

The filesystem containing the files was mounted by mount.cifs and it seems that it has to be mounted with additional flags (nobrl and noserverino) for LaTeX to work properly. LaTeX runs from the local disk and without those flags it tries to reach files on the mounted filesystem, but fails for some reason.

There is a description of the problem in http://ubuntuforums.org/showthread.php?t=1380789

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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