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 just tried pdfcrop but it results in an error message telling me that the file fmtutil.cnf was not found.

The complete error message is:

pdfcrop testfile.pdf
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.

kpathsea: Running mktexfmt pdftex.fmt
/usr/local/bin/mktexfmt: 395: /usr/local/bin/mktexfmt: /texconfig/tcfmgr: not found
fmtutil: config file `fmtutil.cnf' not found.
!!! Error: pdfTeX run failed with value 1!

locate fmtutil.cnf results in:

/usr/local/share/man/man5/fmtutil.cnf.5   
/usr/local/share/man/man5/fmtutil.cnf.man5.pdf
/usr/local/texlive/2013/texmf-dist/doc/man/man5/fmtutil.cnf.5
/usr/local/texlive/2013/texmf-dist/doc/man/man5/fmtutil.cnf.man5.pdf
/usr/local/texlive/2013/texmf-dist/web2c/fmtutil.cnf
/usr/local/texlive/2013/texmf-var/web2c/fmtutil.cnf
/var/lib/texmf/web2c/fmtutil.cnf

I am using texlive on ubuntu 13.10 (manually installed):

tlmgr --version
tlmgr revision 31673 (2013-09-16 18:03:22 +0200)
tlmgr using installation: /usr/local/texlive/2013
TeX Live (http://tug.org/texlive) version 2013

Any idea how to fix this?

echo $PATH gives this:

/opt/texlive/2009/bin/x86_64-linux:/home/myuser/bin/aliases:/home/myuser/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/games:/var/lib/gems/1.8/bin

which pdfcrop gives /usr/local/bin/pdfcrop

and

ls -l $(which pdfcrop)
lrwxrwxrwx 1 root root 48 Jan  1 16:03 /usr/local/bin/pdfcrop -> /usr/local/texlive/2013/bin/x86_64-linux/pdfcrop

kpsewhich pdfcrop results in nothing.

share|improve this question
    
Can you add your PATH variable setting? –  egreg Jan 1 at 11:56
    
The PATH is wrong, you should change /opt/texlive/2009 into \usr/local/texlive/2013 –  egreg Jan 1 at 14:00
    
What's the result of which pdfcrop? –  egreg Jan 1 at 14:21
    
But it seems to be a correct symbolic link: ls -lh /usr/local/bin/pdfcrop lrwxrwxrwx 1 root root 48 Nov 22 16:20 /usr/local/bin/pdfcrop -> /usr/local/texlive/2013/bin/x86_64-linux/pdfcrop –  student Jan 1 at 14:55
    
Thanks. Now it works. However I noticed that your first suggestion already solved it. I just noticed that I misunderstood it. I changed /opt/texlive/2009/bin/x86_64-linux just to /usr/local/texlive/2013 because I assumed tacitly that subdirectories are searched automatically. However changing it to /usr/local/texlive/2013/bin/x86_64-linux just worked (even without removing the link). Perhaps you could turn your comments into an anwer. Then I can accept it and we can clean up the comments. –  student Jan 1 at 15:07

1 Answer 1

up vote 5 down vote accepted

You don't have the correct value for the PATH variable:

/opt/texlive/2009/bin/x86_64-linux:/home/myuser/bin/aliases:/home/myuser/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/games:/var/lib/gems/1.8/bin

points to an old version of TeX Live and there's no trace of the new one. This might very well confuse the system. Change it into

/usr/local/texlive/2013/bin/x86_64-linux:/home/myuser/bin/aliases:/home/myuser/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/games:/var/lib/gems/1.8/bin

If you have symbolic links in /usr/local/bin for the TeX Live binaries, remove them: they won't do nothing good and possibly something bad. Of course this is a matter of opinion, so do what you think best.

I usually recommend adding a file in /etc/paths.d containing the only line

/opt/texbin

and creating a symbolic link

ln -s /usr/local/texlive/2013/bin/x86_64-linux /opt/texbin

so that when a new release is issued (say the 2014 one), you only need to do

rm /opt/texbin
ln -s /usr/local/texlive/2014/bin/x86_64-linux /opt/texbin

(with suitable privileges, of course) and you won't have to worry about changing configuration files nor doing any login-logout procedure.

share|improve this answer
    
@MartinSchröder Thanks –  egreg Jan 2 at 22:15

Your Answer

 
discard

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.