2

Ubuntu ships with texlive 2009, which installs the tex binaries into /usr/bin/latex

I've installed the current version of texlive with its installer, which installs its binaries into /usr/local/texlive/2011/bin/i386-linux/. I've added it to my path (along with the man and info pages, using my .bashrc:

MANPATH=$MANPATH:/usr/local/texlive/2011/texmf/doc/man
export MANPATH
INFOPATH=$INFOPATH:/usr/local/texlive/2011/texmf/doc/info
export INFOPATH
PATH=$PATH:/usr/local/texlive/2011/bin/i386-linux
export PATH

But latex, tex, etc still run the old versions; which latex returns /usr/bin/latex. What is the recommended way to get my system to default to the new binaries, man files, etc? (Seems this should be possible without remapping each binary by hand or replacing the old ones?) Many thanks.

3
  • 1
    On a side note, environment variables should be set in .profile or .pam_environment. If you set them in .bashrc, they will only apply to commands run from interactive bash shells.
    – geirha
    Apr 3, 2012 at 11:03
  • Thanks. I assume the syntax is the same?
    – cboettig
    Apr 4, 2012 at 21:49
  • 1
    in .profile, yes. .pam_environment is read by the pam-env module, and only accepts KEY=VALUE pairs, thus you can't append to PATH via this file.
    – geirha
    Apr 7, 2012 at 16:01

1 Answer 1

3

It will look for thing in the order specified in the path, you've added the new path to the end, and that's why your still getting the old one

PATH=/usr/local/texlive/2011/bin/i386-linux:$PATH

is what your looking for

update

here's a example

$ which ls
/opt/local/libexec/gnubin/ls
$ export PATH=/bin:$PATH
$ which ls
/bin/ls

You must log in to answer this question.

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