2

I updated MacTex to the 2019 version

But when I run latex --version it says I am using the old 2017 version that was previously installed

How do I get it to use the latest install?

invictus
  • 601

3 Answers3

5

MacTeX doesn't support upgrading in place between versions (2017, 2019 etc.). To really upgrade, you can uninstall the old version and install the most up-to-date version afterwards. How to uninstall MacTeX can be found at https://www.tug.org/mactex/uninstalling.html.

On the other hand, if you have installed 2 year-versions at the same time, you can choose which one is the active one by opening Tex Live Utility, choosing "configure" in the top bar, and choosing "change default TeX Live version".

Andrew
  • 313
  • right. I did this, and indeed it shows 2019 is checked-off as the used version. But when I run latex --version it still prints 2017. so now I have no idea which version it is using. – invictus Apr 04 '20 at 23:14
  • 1
    did you start a new session in Terminal (or the alternative you are using) after changing the setting in Tex Live Utility? – Andrew Apr 04 '20 at 23:16
  • yup, makes no difference – invictus Apr 04 '20 at 23:18
  • 1
    Then I would also be trouble shooting. Could you post the contents of your PATH ($ echo $PATH) and the location of your latex executable ($ which latex)? – Andrew Apr 04 '20 at 23:24
  • Path: /Users/Name/.rvm/gems/ruby-2.3.1/bin:/Users/Name/.rvm/gems/ruby-2.3.1@global/bin:/Users/Name/.rvm/rubies/ruby-2.3.1/bin:/usr/local/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Users/Name/.rvm/bin – invictus Apr 04 '20 at 23:26
  • Executable: /usr/local/bin/latex – invictus Apr 04 '20 at 23:26
  • 1
    Then I don't see the problem either, restarting Terminal (or the replacement used) should have completed it. Sorry! – Andrew Apr 04 '20 at 23:40
  • 1
    @invictus It seems to me that you have an additional TeX installation. (I had the same problem some time ago.) So you probably have installed some LaTeX with this ruby stuff. In my case, apart from leading to errors, it slowed down the compilation by an insane amount. –  Apr 04 '20 at 23:45
  • Indeed I have the 2017 and 2019 installation. (MacTex's webpage suggests keeping both). Should I just delete the old one? – invictus Apr 05 '20 at 01:07
  • @invictus What I wanted to say above is that you have at least three installations, two MacTeX installations, which are great, and at least one more, perhaps partial, installation which was done with some other tool, perhaps even when the main thing you were installing at that time was not LaTeX but something that uses it. Get rid of the additional one. See here for a related story. –  Apr 05 '20 at 02:47
  • That executable latex certainly wasn’t installed by MacTeX. One thing you might try is to prepend /Library/TeX/texbin to your PATH so the TeX Live installed by MacTeX is found before whatever the other one is. – Herb Schulz Apr 05 '20 at 15:44
3

I found that a simpler way to uninstall MacTex was using Homebrew (even if you haven’t originally installed MacTex with it). Do this:

brew uninstall --zap --force mactex
xrisk
  • 173
0

Update: I figured out the that only way to get latex --version to use the latest version of MacTeX is to delete the old version. So unlike what MacTeX says on their site, you can't have multiple versions and expect everything to work fine.

invictus
  • 601
  • You can and it has worked fine for years. We do not know what you did to your setup. The way mactex are setup let's you easily switch between them. But if you start mixing in things like macports etc you're messing everything up – daleif Apr 06 '20 at 06:14
  • ok but I don't have macports – invictus Apr 06 '20 at 14:22