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

2020-05-15 Thread peter dalgaard



> On 15 May 2020, at 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  admin48 Jan 13 17:42 a2ping -> 
> /usr/local/texlive/2016/bin/x86_64-darwin/a2ping
> 

Yup, upgrades until 2016 likely overwrote earlier links to 2015, 2014,..

The awk thing just reduces the above to the 9th field (i.e. "a2ping"), so you 
could in principle save the list to a file, say remove.me, and then

for i in `cat remove.me` ; do rm /usr/local/bin/$i ; done

(with a sudo somewhere, and do check carefully...)

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

Yep. That should solve things, provided there's an a2ping in 
/Library/TeX/texbin 

> 
> 
> 
>   ???
>   Thanks very much.
>   Spencer Graves
> 

[snip]
-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


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

2020-05-15 Thread Dr Eberhard W Lisse
Spencer,

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

/etc/paths.d/TeX

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

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

/etc/paths

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.

el

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  admin48 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
e...@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

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac