Installation

check_latex error on WW 2.18 on RHEL 8.4

Re: check_latex error on WW 2.18 on RHEL 8.4

by Kevin Rineer -
Number of replies: 0

Hello!

I'm a random person who has no idea where the development of webwork is headed. I'm just some system admin who was dropped off this web application after a professor retired and it somehow became another of my duties to support it. So take my advice with a grain of salt. I really don't fully understand perl or TeX.


I've found that the release cycle for EL derivatives doesn't correspond well with the development cycle of applications that target faster releases and distributions. For example, the ol9_appstream repository has a 2020 version for the texlive-latex package:

```

dnf info texlive-latex
Last metadata expiration check: 4:24:37 ago on Fri 06 Sep 2024 09:56:31 AM PDT.
Available Packages
Name         : texlive-latex
Epoch        : 9

Version      : 20200406

```

My Fix

I manually installed texlive from CTAN using their install perl script:

```

wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz

tar -xvf install-tl-unx.tar.gz

cd install-tl-20240904/ # Your version may vary!

less install-tl

sudo ./install-tl

ls /usr/local/texlive

find /usr/local/texlive/2024/ -name "path.sty"


/usr/local/texlive/2024/texmf-dist/tex/generic/path/path.sty #there it is!

```

IMPORTANT NOTE:



The default site.conf in the expected /opt/webwork/webwork2/conf/site.conf expects pdflatex and various other programs to be installed by a package manager to a specific filepath.

In my environment, I've overridden the expected paths with the /usr/local/bin symlinks of the same executables that were installed with the install-tl script:

```
diff site.conf site.conf.dist

< $externalPrograms{latex} = "/usr/local/bin/latex --no-shell-escape";
---
> $externalPrograms{latex} = "/usr/bin/latex --no-shell-escape";
< $externalPrograms{pdflatex} = "/usr/local/bin/pdflatex --no-shell-escape";
---
> $externalPrograms{pdflatex} = "/usr/bin/pdflatex --no-shell-escape";
< $externalPrograms{dvipng} = "/usr/local/bin/dvipng";
---
> $externalPrograms{dvipng} = "/usr/bin/dvipng";
< $externalPrograms{dvisvgm} = "/usr/local/bin/dvisvgm";
---
> $externalPrograms{dvisvgm} = "/usr/bin/dvisvgm";
```

Additionally the user who runs the webwork webserver has a TEXMFHOME that is a symlink to the TEXMFDIST.

[wwadmin@webwork ~]$ ls -l ~/texmf/
total 0
lrwxrwxrwx. 1 wwadmin wwadmin 38 Sep  5 11:23 tex -> /usr/local/texlive/2024/texmf-dist/tex
[wwadmin@webwork ~]$


It also seemed to work when I modified the user's BASHRC via `echo "export TEXMFDIST=/usr/local/texlive/2024/texmf-dist" >> ~/.bashrc && source ~/.bashrc`.


Assuming the TeX Live guide is correct, the second method is the "proper" method for handling that environment variable. 

https://www.tug.org/texlive/doc/texlive-en/texlive-en.html#x1-110002.3