[R-SIG-Mac] obsolete LaTeX software in "R CMD check" on Mac?

Dr Eberhard W Lisse e| @end|ng |rom ||@@e@NA
Fri May 15 09:19:37 CEST 2020


MacTeX 2020 "works" differently from MacTeX 2016.  I had 2016 myself but
don't remember what the difference was and when it changed.

The MacTeX 2020 installation creates


which contains '/Library/TeX/texbin' which via a convoluted mechanism
survives upgrades to 2021/2022/etc, but is loaded at the end of the

If '/Library/TeX/texbin' is in the path before '/usr/local/bin', then
the old/non-functioning symlinks in /usr/local/bin are not reached.

That is why it is helpful to remove /etc/paths.d/TeX and adding
'/Library/TeX/texbin' to the beginning of


to ensure (after logout/login) that /Library/TeX/texbin comes first.

	echo $PATH

will also be informative.

But, even in modern systems with large disk space you might want to
remove old crud collected over the years, which doesn't function any
more, because something might hardwire /usr/local/bin and you have again
a difficult to track down issue.  Never mind that just because a certain
R CMD works now it does not mean it'll survive upgrades.

I like a "known state".

Diligence is boring, I know, but I have started to force myself to
writing everything I (need to) do into a "handbook" and to follow it
religiously (I have 4 machines and support 3, so I even wrote a bash
script to run the MacTeX upgrade).

As an aside, the handbook has grown to 580 pages (25 LyX "child"
documents, one common include.tex, a number of "listing" files and
images, all tied into a Makefile :-)-O so it regenerates if anything
changes and even puts it into the cloud :-)-O

And, you are actually supposed to do something like

	rm -fv $(ls -l /usr/local/bin | grep 'texlive' | awk '{print $9}')

which (note the removed year) will remove all links left by previous
MacTeX installations, not just the ones from 2016 :-)-O

By the way, Time Machine is your friend when removing older MacTeX
versions, wich I recently found out myself :-)-O.


On 2020-05-15 06:04 , Spencer Graves wrote:
> Hi, Peter et al.:
>       I'm still overwhelmed.
>       To limit changes to things I think I understand, my
> '/usr/local/texlive' directory contains subdirectories 2014, 2015, 2016,
> 2020, and texmf-local.  From your comments, I gather that the following
> would be wise:
> sudo rm -r /usr/local/texlive/2014
> sudo rm -r /usr/local/texlive/2015
> sudo rm -r /usr/local/texlive/2016
>       I did this, and "R CMD check Ecfun_0.2-4.tar.gz" still ran to
> completion without errors.
>       I don't understand "ls -l /usr/local/bin | grep 'texlive/2016' |
> awk '{print $9}'", but I did "ls -l /usr/local/bin | grep 'texlive/20' >
> texlive_20.txt" and examined texlive_20.txt in R. I found it contained
> 451 lines like the following:
> lrwxr-xr-x  1 sbgraves  admin        48 Jan 13 17:42 a2ping ->
> /usr/local/texlive/2016/bin/x86_64-darwin/a2ping
>       All had "2016".  I'm inferring from your comments that if anything
> I do calls any of those 451 operations like "a2ping", I will get "not
> found".  If I get that, I gather I'm supposed to "sudo rm
> /usr/local/bin/a2ping" and hope that solves the problem.
>       ???
>       Thanks very much.
>       Spencer Graves
Dr. Eberhard W. Lisse   \         /       Obstetrician & Gynaecologist
el using lisse.NA             / *      |  Telephone: +264 81 124 6733 (cell)
PO Box 8421 Bachbrecht  \      /  If this email is signed with GPG/PGP
10007, Namibia           ;____/ Sect 20 of Act No. 4 of 2019 may apply

More information about the R-SIG-Mac mailing list