1

After installing texlive (on LMDE2), pdfcrop is running into errors. The error output is identical to the errors I get when I run updmap from terminal:

/usr/local/texlive/2015/bin/i386-linux/updmap: kpsewhich -var-value=TEXMFROOT failed, aborting early.
BEGIN failed--compilation aborted at /usr/local/texlive/2015/bin/i386-linux/updmap line 28.

I am not a programmer by any means but I am capable of following instructions. Does anyone know a solution to this problem? I have previously used pdfcrop (not to mention latex) for years without errors of this kind.

This is what I get with options --debug --verbose:

PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
* Restricted mode: disabled
* Option `pdfversion': auto
* Perl executable: /usr/bin/perl
* Perl version: v5.20.2
* Pointer size: 4
* Pipe support: yes
* Fork support: yes
* OS name: linux
* Arch name: i586-linux-gnu-thread-multi-64int
* System: unix
* Not found (gs): /usr/local/bin/gs
* Found (gs): /usr/bin/gs
* Autodetected ghostscript command: gs
* Input file: natural.pdf
* Output file: naturalcrop.pdf
* Margins: 0 0 0 0
* PDF header: %PDF-1.4
* Using PDF minor version: 4
* Running ghostscript for BoundingBox calculation ...
* Ghostscript call: gs -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f natural.pdf
GPL Ghostscript 9.06 (2012-08-08)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
%%BoundingBox: 0 0 4 21
%%HiResBoundingBox: 0.162000 0.756000 3.816000 20.807999
* Page 1: 0.162000 0.756000 3.816000 20.807999
* Running pdfTeX ...
* pdfTeX call: pdftex -no-shell-escape -interaction=nonstopmode tmp-pdfcrop-3685
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdftex)

kpathsea: Running mktexfmt pdftex.fmt
/usr/local/texlive/2015/bin/i386-linux/mktexfmt: kpsewhich -var-value=TEXMFROOT failed, aborting early.
BEGIN failed--compilation aborted at /usr/local/texlive/2015/bin/i386-linux/mktexfmt line 25.
I can't find the format file `pdftex.fmt'!
* Cleanup
* Temporary files: tmp-pdfcrop-3685.tex tmp-pdfcrop-3685.log
!!! Error: pdfTeX run failed with value 1!
1
  • The error happens during the run of pdfcrop? Then try again with options --debug --verbose to get more details. Sep 3, 2015 at 18:49

1 Answer 1

1

The error is, that pdfTeX does not find the format file:

kpathsea: Running mktexfmt pdftex.fmt
/usr/local/texlive/2015/bin/i386-linux/mktexfmt: kpsewhich -var-value=TEXMFROOT failed, aborting early.
BEGIN failed--compilation aborted at /usr/local/texlive/2015/bin/i386-linux/mktexfmt line 25.
I can't find the format file `pdftex.fmt'!

Workaround

pdfcrop can also work without format files, when option --ini is used.

Some hints for finding the real cause

The error, why the format generation failed, seems more complicate. Maybe, it helps to generate the format manually (the first acts system wide, the second only for the current user):

sudo fmtutil-sys --byfmt pdftex
fmtutil --byfmt pdftex

But this might also fail, when TEXMFROOT cannot be found. Usually it is configured in texmf.cnf:

% Kpathsea sets SELFAUTOLOC (the directory with the binary),
% SELFAUTODIR (its parent), and SELFAUTOPARENT (its grandparent).
TEXMFROOT = $SELFAUTOPARENT

kpsewhich should be in the same directory as pdftex, probably

$ which kpsewhich
/usr/local/texlive/2015/bin/i386-linux/kpsewhich
2
  • Shouldn't it be sudo fmtutil-sys?
    – egreg
    Sep 3, 2015 at 20:44
  • @egreg fmtutil-sys generates the format for all users, fmtutil for the current user. I have added it to the answer. I do not suspect either of them to work anyway, if TEXMFROOT cannot be found. Sep 3, 2015 at 20:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .