Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
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 '12 at 11:03
    
Thanks. I assume the syntax is the same? –  cboettig Apr 4 '12 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 '12 at 16:01

1 Answer 1

up vote 3 down vote accepted

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
share|improve this answer

Your Answer

 
discard

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.