Installation

check_latex error on WW 2.18 on RHEL 8.4

check_latex error on WW 2.18 on RHEL 8.4

by L Ng -
Number of replies: 1

Hello folks.

I manage to upgrade my WW on RHEL 8.4 from 2.16 to 2.18. A big thank you to Glen and Danny for their feedback.

I tried to run check_latex and got this error:


This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)

entering extended mode

(/opt/webwork/webwork2/bin/check_latex_article.tex

LaTeX2e <2017-04-15>

Babel <3.17> and hyphenation patterns for 3 language(s) loaded.

(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls

Document Class: article 2014/09/29 v1.4h Standard LaTeX document class

(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))

(/opt/webwork/webwork2/assets/tex/webwork2.sty


! LaTeX Error: File `path.sty' not found.


Type X to quit or <RETURN> to proceed,

or enter new name. (Default extension: sty)


Enter file name:

! Emergency stop.

<read *>


l.6 \discretionaries

                     |~!@$%^&*()_+`-=#{"}[]:;'<>,.?\/abcdefghijklmnopqrstuvw...


!  ==> Fatal error occurred, no output PDF file produced!

Transcript written on check_latex_article.log.


Compilation Failure: Examine the latex output above to see what went wrong.

You may also examine check_latex_svT5dP9h/check_latex.log and check_latex_svT5dP9h/check_latex.aux.


Any hints on how i can resolve this?

In reply to L Ng

Re: check_latex error on WW 2.18 on RHEL 8.4

by Kevin Rineer -

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