0

The subject "override system search path" seems to be similar to mine however, there is still a problem I cannot fond out. So I am running Mageia and installed the package provided by this distribution. When I ran the compilation of a file.tex I get this error message

    ! LaTeX Error: File `beamer.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
Enter file name: /usr/local/texlive/2014/texmf-dist/tex/latex/beamer/beamer.cls
(/usr/local/texlive/2014/texmf-dist/tex/latex/beamer/beamer.cls

Which is not correct since : - the path /usr/local/texlive/2014 is relevant to an other version of texlive manually installed with install-texlive-unx. - the correct location of the beamer class is : /usr/share/texmf-dist/tex/latex/beamer/

We could say that the system variables is wrong pointing on /usr/local/texlive/2014/texmf-dist/ instead of /usr/share/texmf-dist/. But with texdoc.conf I get

=========================== kpathsea variables ===========================
TEXMFMAIN=/usr/share/texmf-dist
TEXMFDIST=/usr/share/texmf-dist
TEXMFLOCAL=/usr/share/texmf-local
TEXMFSYSVAR=/var/lib/texmf
TEXMFSYSCONFIG=/etc/texmf
TEXMFVAR=/home/denis/.texlive2013/texmf-var
TEXMFCONFIG=/home/denis/.texlive2013/texmf-config
TEXMFHOME=/home/denis/texmf
VARTEXFONTS=/home/denis/.texlive2013/texmf-var/fonts
TEXMF={/home/denis/.texlive2013/texmf-config,/home/denis/.texlive2013/texmf-var,/home/denis/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/share/texmf-local,!!/usr/share/texmf-dist,/usr/share/texmf}
SYSTEXMF=/var/lib/texmf:/usr/share/texmf-local:/usr/share/texmf-dist
TEXMFDBS={!!/etc/texmf,!!/var/lib/texmf,!!/usr/share/texmf-local,!!/usr/share/texmf-dist}
WEB2C={/home/denis/.texlive2013/texmf-config,/home/denis/.texlive2013/texmf-var,/home/denis/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/share/texmf-local,!!/usr/share/texmf-dist,/usr/share/texmf}/web2c
TEXPSHEADERS=.:{/home/denis/.texlive2013/texmf-config,/home/denis/.texlive2013/texmf-var,/home/denis/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/share/texmf-local,!!/usr/share/texmf-dist,/usr/share/texmf}/{dvips,fonts/{enc,type1,type42,type3}}//
TEXCONFIG={/home/denis/.texlive2013/texmf-config,/home/denis/.texlive2013/texmf-var,/home/denis/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/share/texmf-local,!!/usr/share/texmf-dist,/usr/share/texmf}/dvips//
ENCFONTS=.:{/home/denis/.texlive2013/texmf-config,/home/denis/.texlive2013/texmf-var,/home/denis/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/share/texmf-local,!!/usr/share/texmf-dist,/usr/share/texmf}/fonts/enc//
TEXFONTMAPS=.:{/home/denis/.texlive2013/texmf-config,/home/denis/.texlive2013/texmf-var,/home/denis/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/share/texmf-local,!!/usr/share/texmf-dist,/usr/share/texmf}/fonts/map/{kpsewhich,pdftex,dvips,}//

Where all is correct except :

TEXMFVAR=/home/denis/.texlive2013/texmf-var
TEXMFCONFIG=/home/denis/.texlive2013/texmf-config

VARTEXFONTS=/home/denis/.texlive2013/texmf-var/fonts
TEXMF={/home/denis/.texlive2013/texmf-config,/home/denis/.texlive2013/texmf-var,/home/denis/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/share/texmf-local,!!/usr/share/texmf-dist,/usr/share/texmf}

Because there is no /home/denis/.texlive2013 directory. These variables are not defined in my .bashrc or .profile and I have no idea where to find it neither in the /etc/.bashrc or /etc/.profile.

So I wonder what to do. Thanks for your help.

  • 1
    You need to set the correct system PATH, especially if you have two LaTeX installations on the same machine. Make prepend the correct path to TeXLive to $PATH in ~/.profile, log out and in again. Test that it has the correct LaTeX via which latex. – daleif May 27 '15 at 12:50
  • I think it is done if we consider the value of TEXMFMAIN. So I had in my .bashrc I had path to /usr/share/texmf-dist but the system still does not find the files *.sty which are into /usr/share/texmf-dist/tex/../ and echo $PATH gives : /usr/local/bin:/usr/bin:/usr/games:/usr/lib64/qt4/bin:/home/denis/bin::/usr/share/texmf-dist – Deun May 27 '15 at 16:33
  • That is not really what we are checking right now, (1) need to figure out if you are getting the right latex version, (2) figure out where us the appropriate place to place files for that latex version. If your latex (which is why I mention the which test) is under usr/local/texlive then it will never search usr/share. The usr/local/texlive tree is localized under a single tree, not spread out as the latex from the Linux dist – daleif May 27 '15 at 16:45
  • Thanks.So, Initially installed the package from Mageia repository. Then the texlive installer. Then nothing worked fine. I removed everything I could find with a link to TeX. Finally I re-installed the package from Mageia i.e. in /usr/share/texmf-dist. Sorry I did not understood that "which" was a command... excuses-me I should pay more attention to your messages. So hte latex command are in /usr/bin and linked to /usr/share/texmf-dist/ – Deun May 28 '15 at 8:26
  • I am still stuck with this problem and need help, please. – Deun Jun 3 '15 at 8:10
0

So, part of the solution is here and very well explained and detailed. I also had changed the permissions for sty and cls files making them readable and executable as well.

Then the other problem was comming from my .bash_profile with this line :

TEXINPUTS=$HOME/Plantillas/macros/;export TEXINPUTS

I removed it and it works fine.

Next ? How can I tell to the system that I want my macros in this directory (I will try to figure out this before posting).

  • Why making .cls and .sty files executable? – user31729 Aug 6 '15 at 14:18
  • I guess it is needed since they are executed when we compile the tex file. But I am wrong, I just tried without executable byte and it works. – Deun Aug 6 '15 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.