2

I'm trying to get pdflatex working on AWS Lambda and I've hit a roadblock. I believe I have the basic tex engine running as I'm able to run the command pdflatex -version and get the correct information.

However, when I try to compile an actual latex file (pdflatex sample.tex) I get the following error:

   kpathsea: Running mktexfmt pdflatex.fmt
   mktexfmt: No such file or directory

Due to the ephemeral nature of AWS Lambda I created a new bin/ folder, added it to the $PATH and included in it all of the required dependencies as well as rebuild the ls-R file at the root of the directory. The ls-R file contains the location of pdflatex.fmt but my guess is that it's not searching the correct directory for the ls-R file. The kpathsea documentation states you can set the default installation location in $TEXMF but that doesn't seem to have worked.

$ echo $TEXMF
/var/task/bin # the created bin directory

Any ideas on how to continue debugging this installation? Or if there's a better approach at this.

5
  • 1
    Welcome! So does kpswhich pdflatex.fmt return nothing? What have you set TEXMF to? Do you mean that you have ls-R, bin/? Do you not have texmf.cnf somewhere? I guess ... how familiar are you with TeX Live in other contexts?
    – cfr
    Jan 17, 2017 at 2:52
  • @cfr thanks for the help! I do not have the command kpswhich (I installed the texlive-scheme-basic if that changes anything). I don't have much familiarity with TeX Live in general other than the reading that I've been doing in the past couple of days (if you have any useful links I appreciate it). I realized that I hadn't modified the contents of texmf.cnf to match the Lambda environment but that didn't change anything. I've updated the original question with the value of $TEXMF. I'm not sure I get your question about ls-R and bin/.
    – dmlittle
    Jan 17, 2017 at 3:22
  • I can't imagine the basic schema does not include kpsewhich. At least, that's surprising. kpsewhichis part of the kpathsea TeX Live package. It is part of collection-basic and classified as TLCore.
    – cfr
    Jan 17, 2017 at 4:07
  • Do you have mktexfmt? That looks to be missing too? You seem to be missing essential binaries or they are not found in your PATH.
    – cfr
    Jan 17, 2017 at 4:16
  • 1
    It looks like they tried to use kpswhich, but that is a typo. It should be kpsewhich Jul 12, 2021 at 16:09

1 Answer 1

1

The error is even before finding the latex.fmt file.

   mktexfmt: No such file or directory

Here, the engine is complaining that it cannot find the mktexfmt binary. I ran into this issue as well, and after spending some time trying to find the [xe]latex.fmt file, I tried to obtain the mktexfmt binary.

  1. Open up tlmgr -gui, and in the "Match" textbox, input mktexfmt. This will display one or two packages, named texlive-scripts.
  2. Select all that you see at the end of this search, and install. I would guess that using the CLI, you could alternatively do tlmgr install texlive-scripts.

At the end of this, the LaTeX engine stopped complaining about not finding mktexfmt, so I imagine it is supplied by the texlive-scripts package.

1
  • Fixed this on my Arch installation by installing the texlive-core package from extra. Feb 14 at 6:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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