Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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'm not sure if this is a bug or I've done something wrong (or I simply don't know luatex well enough). This minimal example file test.tex


A random number:

Should compile with lualatex test.tex but fails with:

! LaTeX Error: File `luacode.sty' not found.

It sounds like something was messed up in the installation of luatex. They look to be installed:

> dpkg --get-selections | grep luatex
luatex                  install
texlive-luatex          install

The file exists on my system:

> locate luacode.sty 

so I'm not how to troubleshoot this. Is the package messed up or is it a problem on my end?

share|improve this question
up vote 4 down vote accepted

The path /usr/local/texlive... indicates that you've mixed up Ubuntu packages and TeXLive from source (upstream).

Don't do this.

lualatex isn't looking for the file in that location. Install texlive-luatex now properly (possibly apt-get install --reinstall).

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.