Re: [R-SIG-Mac] obsolete LaTeX software in "R CMD check" on Mac?
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 On 2020-05-14 02:51, peter dalgaard wrote: Well, you solved the immediate problem. However, you could get in trouble later with other tools from the 2016 TeXlive set, which seems to be what you have lingering. There doesn't seem to be an uninstaller that removes the symlinks on Mac. So... Either: (a) remove all links manually plus the entire /usr/local/texlive/2016 tree. Or: (b) ensure that the current TeXlive stuff is found ahead of /usr/local/bin (a) is a bit painful when it comes to the symlinks. There are likely around 450 of them. Of course, only a handful are ever used, so once /usr/local/texlive/2016 is gone, you just get a 'not found' type error and can remove the offending link one at a time. It is possible to automate it, but a bit dangerous if you get it wrong... Something like ls -l /usr/local/bin | grep 'texlive/2016' | awk '{print $9}' should give you a list. (...which with a bit of diligence, you can have removed in one swoop, but...) (b) is more expedient (but leaves the mess in /usr/local/bin): edit /etc/paths with, like, sudo nano /etc/paths insert /Library/TeX/texbin at the top and save. Then, for good measure sudo rm /etc/paths.d/TeX so that it isn't in $PATH twice. -pd On 14 May 2020, at 01:21 , Spencer Graves wrote: Hi, Eberhard: Please excuse: I've already solved this problem. "sudo rm /usr/local/bin/pdflatex" did the trick. You may be right that I should reformat my hard drive and restore from my TimeMachine. However, that sounds too much like "do-it-yourself lobotomy" to me. I don't plan to try that right now. Thanks again for your suggestions. Spencer On 2020-05-13 18:16, Dr Eberhard W Lisse wrote: Spencer, If you just google https://www.google.com/search?q=uninstallpkg the first link coming up is the right one. But see below. Do you have a ~/Downloads directory? Did you look in there? So the removing of /usr/local/bin/pdflatex did not remove the old 2019 version. Which is why I proposed uninstallPKG to get rid of all the old crud. To be honest, I reckon you should run TimeMachine and then re-install Catalina after reformatting your hard disk, restore your home directory and then carefully (step by step) install the Xcode Command Lime Tools, homebrew, MacTeX and R, which will give you a known state. I like to have a consistent, known state, with only one (the latest if possible) version of everything and if possible via the Software Update or a package manager (homebrew). homebrew has what is called Casks, which installs proper MacApps (often from the original developers’ site). I check regularly whether there are (new) casks for apps I have manually installed which I then install (overwrite) so a brew upgrade brew cask upgrade will sort me out btw, I just looked and brew cask install uninstallpkg will do the deed nicely. el On 2020-05-13 23:31 , Spencer Graves wrote: Thank you all for your comments on this. I'm overwhelmed, not just with the volume of the discussion, but my own ignorance of the standard command line protocols. After trying some but on all of Eberhard Lisse's and Peter Dalgaard's suggestions below, the problem disappeard after I executed "sudo rm /usr/local/bin/pdflatex". I tested "R CMD check Ecfun_0.2-4.tar.gz" right before I did that, and the problem was still there. It disappeared right after I did that. Lisse's "UninstallPKG" might have been more graceful, but I couldn't find the key to that padlock, so I used something that seems more like boltcutters instead -- and it worked. Thanks again, Spencer Graves On 2020-05-13 09:57, Dr Eberhard W Lisse wrote: Peter, as far as I understand this the idea is to make the binaries of whatever
Re: [R-SIG-Mac] obsolete LaTeX software in "R CMD check" on Mac?
Well, you solved the immediate problem. However, you could get in trouble later with other tools from the 2016 TeXlive set, which seems to be what you have lingering. There doesn't seem to be an uninstaller that removes the symlinks on Mac. So... Either: (a) remove all links manually plus the entire /usr/local/texlive/2016 tree. Or: (b) ensure that the current TeXlive stuff is found ahead of /usr/local/bin (a) is a bit painful when it comes to the symlinks. There are likely around 450 of them. Of course, only a handful are ever used, so once /usr/local/texlive/2016 is gone, you just get a 'not found' type error and can remove the offending link one at a time. It is possible to automate it, but a bit dangerous if you get it wrong... Something like ls -l /usr/local/bin | grep 'texlive/2016' | awk '{print $9}' should give you a list. (...which with a bit of diligence, you can have removed in one swoop, but...) (b) is more expedient (but leaves the mess in /usr/local/bin): edit /etc/paths with, like, sudo nano /etc/paths insert /Library/TeX/texbin at the top and save. Then, for good measure sudo rm /etc/paths.d/TeX so that it isn't in $PATH twice. -pd > On 14 May 2020, at 01:21 , Spencer Graves wrote: > > Hi, Eberhard: > > > Please excuse: I've already solved this problem. "sudo rm > /usr/local/bin/pdflatex" did the trick. > > >You may be right that I should reformat my hard drive and restore from > my TimeMachine. However, that sounds too much like "do-it-yourself lobotomy" > to me. I don't plan to try that right now. > > > Thanks again for your suggestions. > Spencer > > > On 2020-05-13 18:16, Dr Eberhard W Lisse wrote: >> Spencer, >> >> If you just google >> >> https://www.google.com/search?q=uninstallpkg >> >> the first link coming up is the right one. But see below. >> >> >> Do you have a ~/Downloads directory? Did you look in there? >> >> >> So the removing of /usr/local/bin/pdflatex did not remove the old 2019 >> version. Which is why I proposed uninstallPKG to get rid of all the old >> crud. >> >> To be honest, I reckon you should run TimeMachine and then re-install >> Catalina after reformatting your hard disk, restore your home directory >> and then carefully (step by step) install the Xcode Command Lime Tools, >> homebrew, MacTeX and R, which will give you a known state. >> >> I like to have a consistent, known state, with only one (the latest if >> possible) version of everything and if possible via the Software Update >> or a package manager (homebrew). >> >> >> homebrew has what is called Casks, which installs proper MacApps (often >> from the original developers’ site). I check regularly whether there >> are (new) casks for apps I have manually installed which I then install >> (overwrite) so a >> >> brew upgrade >> brew cask upgrade >> >> will sort me out >> >> btw, I just looked and >> >> brew cask install uninstallpkg >> >> will do the deed nicely. >> >> el >> >> On 2020-05-13 23:31 , Spencer Graves wrote: >>> Thank you all for your comments on this. I'm overwhelmed, not >>> just with the volume of the discussion, but my own ignorance of the >>> standard command line protocols. >>> >>> >>> After trying some but on all of Eberhard Lisse's and Peter >>> Dalgaard's suggestions below, the problem disappeard after I executed >>> "sudo rm /usr/local/bin/pdflatex". I tested "R CMD check >>> Ecfun_0.2-4.tar.gz" right before I did that, and the problem was still >>> there. It disappeared right after I did that. >>> >>> >>> Lisse's "UninstallPKG" might have been more graceful, but I >>> couldn't find the key to that padlock, so I used something that seems >>> more like boltcutters instead -- and it worked. >>> >>> >>> Thanks again, >>> Spencer Graves >>> >>> >>> On 2020-05-13 09:57, Dr Eberhard W Lisse wrote: Peter, as far as I understand this the idea is to make the binaries of whatever MacTeX you use available in /Library/TeX/texbin >>> >>> Finder says this was installed yesterday, presumably when I >>> installed MacTex. so that it survives the (annual) upgrade of MacTeX or a switch from the Basic to the Big MacTeX or whatever. I would personally not remove the pdflatex, but find something like UninstallPKG >>> >>> How do I find something like "UninstallPKG"? >>> >>> and then locate MacTeX in there and remove that (all versions, so all old crud goes away. If you, like me, use MacTeXBasic you can do something like >>> >>> I don't think I'm using MacTexBasic, but I'm not a big LaTeX user, >>> beyond trying to make RMarkdown work these days (and having used LaTeX >>> when writing "Functional Data Analysis with R and Matlab with Ramsay and >>> Hooker over a decade ago). >>> if [ ! -x /usr/local/bin/gawk ] >>> >>> I don't seem to