Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku buildpack - Installing texlive binary package

I'm trying to install the texlive-full package on heroku through making a custom buildpack. I'm working on django application, so I'm currently using version of heroku-buildpack-python (https://github.com/heroku/heroku-buildpack-python).

According to this tutorial: https://devcenter.heroku.com/articles/buildpack-binaries I found a binary package of texlive on http://packages.ubuntu.com/lucid/texlive-binaries (Links in the right column - Download Source Package) and I added these lines of code in python default heroku buildpack in the section #Build time in order to extract and install texlive-full on heroku.

# Build Time

# Switch to the repo's context.
cd $BUILD_DIR

TEXLIVE_BINARY="http://archive.ubuntu.com/ubuntu/pool/main/t/texlive-base/texlive-base_2012.20120611-5.debian.tar.gz"
TEXLIVE_VENDOR="vendor/texlive"

# vendor awesome-vm
mkdir -p $1/$TEXLIVE_VENDOR
curl $TEXLIVE_BINARY -o - | tar -xz -C $1/$TEXLIVE_VENDOR -f -

After pushing the django application to heroku I can see that slug is 58.0 MB big (before it was just 10.0 MB), so it might have added texlive-full binary package to it (which is about 44 MB). However the latex equation on the site is still not showing and the same error appears; (That appears when texlive is not installed)

ValueError at / latex returned code 32512 for formula:

Is there some easier way to install texlive-full on heroku? Or what is the correct notation for installing texlive-full in buildpack or any other kind of debian package?

like image 856
optimista Avatar asked Nov 06 '12 15:11

optimista


2 Answers

Based on this buildpack I built my own version: https://github.com/syphar/heroku-buildpack-tex

It installs a small version of TeX-Live 2013 in your slug, and you can extend it by adding your own packages (collections or single packages from CTAN).

Since your (compressed) slug-size is limited to 300 MB on Heroku you can't texlive-full inside your application.

like image 167
Denis Cornehl Avatar answered Nov 20 '22 09:11

Denis Cornehl


This buildpack worked for me: https://github.com/holiture/heroku-buildpack-tex

like image 1
hammady Avatar answered Nov 20 '22 11:11

hammady