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

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 ===========================

Where all is correct except :



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, 2015 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, 2015 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, 2015 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, 2015 at 8:26
  • I am still stuck with this problem and need help, please.
    – Deun
    Jun 3, 2015 at 8:10

1 Answer 1


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, 2015 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, 2015 at 14:44

You must log in to answer this question.

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