I'm running Ubuntu 12.04 LTS and Kile for LaTeX document editing. I would like to use the media9 package to embed videos and 3D objects (via .u3d files) in a PDF document. I'm totally new in the LaTeX world. So I'm not familiar with package installation with Kile. Is there anyone who could help me to install the media9 package please?


LaTeX Installation:

  • run in terminal window: sudo apt-get install texlive cm-super gv spdf kile -y => At this stage no problem!

media9 installation :

  • download the file: http://tug.ctan.org/tex-archive/install/macros/latex/contrib/media9.tds.zip

  • run the command in the terminal: kpsewhich -var-value TEXMFLOCAL --> terminal output: /usr/local/share/texmf

  • unzip it in media.tds.zip in /usr/local/share/texmf

  • run sudo texhash --> terminal output:

    texhash: Updating /usr/local/share/texmf/ls-R...
    texhash: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
    texhash: Updating /var/lib/texmf/ls-R-TEXLIVE...
    texhash: Updating /var/lib/texmf/ls-R...
    texhash: Done.

Moreover ls-R file seems to be well updated since it includes a lot of media9 stuff.

Then when compiling my .tex document an error message occurs saying: media9.sty is not found

I tried a lot of tricks I found on the internet. I installed texlive-extra-utils and texlive-latex-extra-doc and some other packages. Finally media9 isn't missing anymore, but now expl3 is not found!!

I installed texlive-latex3. It seemed to solve the problem, but now l3regex.sty is not found! Endless problems....

At this address I found the list of required packages for media9. After installing all these packages, media9 should be running, am I right ? Could anyone please indicate which files to install relative to these packages? When installing texlive-full will I be able to run media9?

Any help would be highly appreciated :)

  • 2
    Did you try sudo apt-get install texlive-latex-extra before doing the manual install? However, if you still have the TeX Live/Debian 2009 distribution, you're bound to every kind of headache. Don't manually install packages, the version on CTAN may want other packages that you don't have (at least in the required version).
    – egreg
    Commented Jul 15, 2013 at 17:43
  • Welcome to TeX.SX! Your post was migrated here from Ask Ubuntu. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question.
    – egreg
    Commented Jul 15, 2013 at 18:11
  • Are you planning on viewing the compiled files on Ubuntu? To my knowledge, there is not a PDF viewer on Ubuntu that will do this correctly (even Acrobat Reader for Linux).
    – scottkosty
    Commented Jul 16, 2013 at 6:16

1 Answer 1


The media9 package uses quite a lot of features from the most current version of expl3. As such, you either need to: - Install both media9 and the support manually - Install a TeX distribution that already includes it

The latter option is covered in How to install "vanilla" TeXLive on Debian or Ubuntu?, so here I will focus on the first approach.

From http://mirrors.ctan.org/tex-archive/install/macros/latex/contrib, you need to download

Unzip all of these where shown by kpsewhich -var-value TEXMFLOCAL (i.e. /usr/local/share/texmf in your case) and then run texhash /usr/local/share/texmf as root. This should add all of the new files to the hash, and you should be good to go.

You must log in to answer this question.

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