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've installed texlive-2012 on my local user account (under linux), the system has the older version (texlive-2007) in which some packages are missing and I don't have root permission to install those packages. To force the system recognize my installation I changed some search paths in ~/.bashrc as suggested in similar post:

export TEXMF='{/home/avaz/texlive/texmf,/home/avaz/texlive/texmf-dist/tex/latex/base,/home/avaz/texlive/texmf-var,/home/avaz/texlive/texmf-config,/home/avaz/texmf,/etc/texmf,confTEXMFSYSVAR,confTEXMFLOCAL,confTEXMFMAIN,confTEXMFDIST}'
export TEXMFHOME='/home/avaz/texlive/texmf'
export TEXMFLOCAL='/home/avaz/texlive/texmf'

which obviously /home/avaz/ is my home folder where texlive-2012 is installed, but when I run ~/textlive/bin/x86_64-linux/latex myfile.tex I get the error:

! LaTeX Error: File `article.cls' not found.

'article.cls' is located in ~/texlive/texmf-dist/tex/latex/base/, but I don't why latex doesn't go through this. This is an excerpt I get with texconfig conf:

=========================== kpathsea variables ===========================
TEXMFMAIN=/usr/share/texmf
TEXMFDIST=/usr/share/texmf
TEXMFLOCAL=/home/avaz/texlive/texmf
TEXMFSYSVAR=/var/lib/texmf
TEXMFSYSCONFIG=/etc/texmf
TEXMFHOME=/home/avaz/texlive/texmf

Have I done something wrong or anything left which I have to change to work it out?

share|improve this question
2  
If you remove the changes you made to ~/.bashrc and ask the terminal echo $TEXMF, what do you get? In any case, you need to change PATH so that the binaries of TeX Live 2012 are found before the system wide ones. –  egreg Dec 6 '12 at 23:27
    
The same thing as above in { } but another error comes in 'tcfmgr.map' not found. could you tell what exactly I have to change in PATH? –  pasha Dec 6 '12 at 23:52
1  
Try export PATH=~/texlive/bin/x86_64-linux:${PATH} in your .bashrc file and restart the terminal. Don't set TEXMF and similar variables. –  egreg Dec 6 '12 at 23:54
    
Thanks alot! the 'article.cls' error resolved. Now I have another error for packages like graphicx (.sty files). I think I've changed something that I have to include those paths in my .bashrc otherwise I get 'tcfmgr.map' error –  pasha Dec 7 '12 at 0:45
1  
The binaries of TeX Live configure themselves to use the correct paths and set internally the necessary environment variables like TEXMF based on texmf.cnf. You generally have to set nothing in the environment, except the path to the binaries. –  egreg Dec 7 '12 at 0:51
show 1 more comment

1 Answer

up vote 4 down vote accepted

The binaries of TeX Live configure themselves to use the correct paths for file searches and internally set variables such as TEXMF and friends based on the values established in the texmf.cnf file they are able to find because it's in a fixed position with respect to the directory containing the binaries.

This said, you have only to modify the PATH variable; based on your message, it seems that stating

export PATH=~/texlive/bin/x86_64-linux:${PATH}

in your ~/.bashrc file should be sufficient to solve the problems.

Make sure that no variable whose name starts with TEX is set in the environment (well, no variable among those that are found in texmf.cnf; in case of doubt consult an expert).

share|improve this answer
add comment

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.