Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I installed Tex Live by apt-get on Ubuntu, and I could access to latex commands both in Terminal and in web scripts; e.g. in PHP by shell_exec('pdflatex -version');

On a similar machine, I installed from source. I put PATH both in my user and /etc/profile. I could access to latex with all users (including my web user) in Terminal; but in web scripts I get error pdflatex: not found.

How apt-get make latex commands globally available on the machine, and what should I do so with installation from source?

share|improve this question
This looks more like an Ubuntu issue than a TeX one. If you want to see what apt-get does besides just installing a package, get hold of the deb file and do dpkg -e deb-file then look at the created file DEBIAN/postinst. That'll explain what extras are done after the package is installed, such as setting paths and so forth. –  Loop Space Mar 2 '12 at 13:26

1 Answer 1

up vote 2 down vote accepted

You may try creating symlinks in standard locations with tlmgr path add: this will create symlinks for the executables in /usr/local/bin which is hopefully in the path of every user. You can adjust the location of the symlinks with tlmgr option sys_bin <value> before creating the symlinks.

If this doesn't work, there's nothing more you can try on the TeX Live side of things, so you'd better ask on serverfault or something how to set the path for your web server.

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.