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.

Deun
  • 21
  • 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 08:26
  • I am still stuck with this problem and need help, please. – Deun Jun 03 '15 at 08:10
  • Exactly what kind of TeXLive did you install? And did you install all of TeXLive? The TeXLive provided by Linux dists are often broken into 10s if not 100s of texlive-... packages which confuses a lot of users. This is why I tend to recommend to install it all or manually install TUG TeXLive (which installs everything). Then you do not need to figure out which texlive-... linux package to install in order to have access to beamer. – daleif Jun 03 '15 at 10:05
  • No I had selected the option to choose packages myself from the TeXLive installer. So this TexLive I had installed and removed is TeX Live (http://tug.org/texlive) version 2014 – Deun Jun 05 '15 at 11:42
  • I am still with this problem. By the time being I had upgrade my linux distribution, and reinstall Texlive from the paquage repository of the mu linux distribution : 'rpm -qa|grep texlive texlive-texmf-20130530-10.mga5 texlive-dist-20130530-10.mga5 texlive-20130530-21.mga5 texlive-collection-basic-20130530-10.mga5' Then 'kpsewhich article.cls' gives nothing. But if I do it with sudo I get '/usr/share/texmf-dist/tex/latex/base/article.cls' and 'which latex /usr/bin/latex'. In my PATH I had included '/usr/share/texmf-dist '. Still wondering what to do... – Deun Aug 06 '15 at 11:06
  • This very usefull post helped a bit. I just had had find /usr/share/texmf-dist/ -name '*.sty' -exec chmod go+x {} ';' and the same with 'go+r' ; and then for all cls files. Indeed, I still have the problem as normal user, but as root I can compile the tex files. On the way to solve it..... I hope – Deun Aug 06 '15 at 13:10

1 Answers1

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).

Deun
  • 21
  • Why making .cls and .sty files executable? –  Aug 06 '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 06 '15 at 14:44