Hi, I recently updated to Fedora 38 from F36* and now I can’t compile LaTeX files or Rmarkdown files (which uses LaTeX) to PDF.
*Actually, this started to happen before I made the upgrade to F38 in Rmarkdown, I’m not sure about TeXStudio though, since I didn’t use it before upgrading but after compiling to pdf in Rmarkdown had stopped working.
Specifically, I’m finding this error::
! pdflatex: error while loading shared libraries: liblog4cxx.so.11: cannot open shared object file: No such file or directory
If I change the compiler to xelatex instead of pdflatex, I still find a very similar error:
error while loading shared libraries: libicui18n.so.69: cannot open shared object file: No such file or directory
I’ve noticed that have installed this versions (under /usr/lib/):
In both cases it appears the library file version number is not provided.
# dnf provides */liblog4cxx.so*
Last metadata expiration check: 3:30:40 ago on Thu 18 May 2023 09:27:10 AM CDT.
log4cxx-0.13.0-3.fc38.x86_64 : A port to C++ of the Log4j project
Repo : fedora
Filename : /usr/lib64/liblog4cxx.so.13
Filename : /usr/lib64/liblog4cxx.so.13.0.0
dnf provides */libicui18n.so*
Last metadata expiration check: 3:35:36 ago on Thu 18 May 2023 09:27:10 AM CDT.
libicu-72.1-2.fc38.x86_64 : International Components for Unicode - libraries
Repo : @System
Filename : /usr/lib64/libicui18n.so.72
Filename : /usr/lib64/libicui18n.so.72.1
I only have the 64bit versions installed under /lib/lib64 and I see the libicu* versions for 67, 71, and 72, and do not have the liblog4cxx files at all.
In come cases it is possible to create a local symlink with the needed name within the library to point to the existing library file. It may or may not work.
My system shows this
I use Rstudio and rmarkdown, but with the Fedora 38 packages for TeX Live and with CTAN TeX Live 2023. The CTAN binaries are statically linked, so should not generate errors loading shared libraries. You appear to be using different binaries. Is there a reason you can’t use the Fedora 38 texlive packages?
No other reason than not being able to get it to work, haha.
I have the TeX Live packages, I’m not sure if I have the CTAN binaries. If they also get installed when you install TeX Live, then I have them, otherwise I don’t.
How do you use them in RStudio? I’ve looked around the setting but I can only use pdflatex and xelatex (both fail). I read you can also set a custom one using the RSTUDIO_PDFLATEX environment variable, but I’m not sure how to do that. Do I put the path to the CTAN binaries there?
Yes, Fedora packages are a rebuild of the TeXlive distribution, often “somewhat behind” in version.
I suggest not to mix Fedora packages (dnf) with a local TeXlive installation (tlmgr). Using Fedora packages (for TeXlive, TeXStudio, RStudio) should give you the best integration.
As soon as you compile packages locally (e.g. by installing TeXlive locally) you will have to take care of rebuilds etc. manually. Apparantly this is what happended here: some local install of pdflatex that got out of date with the present libraries.
If you plan to build Fedora rpms that have TeX documantation you should stick with the Fedora
The CTAN TeX Live (TL) packages are statically linked. You can easily switch between Fedora and CTAN TL using the Lmodpackage, (used to switch between mpi/mpich-x86_64 and mpi/openmpi-x86_64. Try running ml avail in a terminal.)
TL is a large with many interdependencies, so it is a lot work to maintain outside distro packages or CTAN TL. For R users, there is R-tinytex.noarchbased on CTAN TL and intended to provide just what is required for R.