I have tried to run metapost with the command:

mpost myfigure.mp

I got an error which I've seen a lot of people ask about:

Sorry, I can't find the 'mpost' preload file; will try 'plain'.
I can't find the 'plain' preload file!

But for me, the solution of running:

sudo apt-get install texlive

made no difference.

How exactly is metapost run?

  • There is no single texlive package is Ubuntu it is split up in lots and lots (very confusing for the user, and why I use upstream texlive instead. Nevertheless, try searching sudo apt update and then apt-cache search metapost (the latter does not need sudo)
    – daleif
    Oct 20, 2018 at 5:45
  • mpost is looking for /usr/local/texlive/2017/texmf-dist/metapost/base/mpost.mp and /usr/local/texlive/2017/texmf-dist/metapost/base/plain.mp but it can't find them on your system.... (or ..2018.. if you are more up to date than me)
    – Thruston
    Oct 20, 2018 at 9:09

1 Answer 1


While the MetaPost binary is already installed on your system, Ubuntu does not install any MetaPost format by default. Like daleif mentioned in a comment you could avoid this confusing situation by using upstream TeXLive or you can install the formats:


sudo apt-get install texlive-metapost

Then the command

mpost myfigure.mp


If you want to use the MetaFun extensions, you need metafun.mp from ConTeXt. To install ConTeXt using Ubuntu packages, just run

sudo apt-get install context

Then you can use MetaPost with the MetaFun format using

mpost '@metafun' myfigure.mp
  • sudo apt-get install texlive-metapost did the tick for me in Ubuntu 16.04! Oct 24, 2018 at 22:22

You must log in to answer this question.

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