What are the practical differences between installing LaTeX from MacTeX or MacPorts/Homebrew?

It is possible to install MacTeX with homebrew using Homebrew Cask via

$ brew tap caskroom/cask
$ brew cask install mactex

Since that basically downloads the MacTeX.pkg from ctan it should not be different from the usual manual installation.

If you would like to install without the GUI, you can

$ brew cask install mactex-no-gui

[edit] Homebrew 2.2.6

Skip the brew tap caskroom/cask or the following error occures:

Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.

If you do what it's says, you will get:

Error: caskroom/cask-cask was moved. Tap homebrew/cask-cask-cask instead.

You can continue to do what it tells you, until you realize that you should look for help online. I think it is a fun, yet unhelpful error message, maybe there is a good reason for it. Just go ahead and do

$ brew cask install mactex

Edit 2021

brew has once again changed its syntax for this. You should now be using

$ brew install --cask mactex

  1. Homebrew does not provide any version of LaTeX:

    $ brew search latex
    latex-mk     latex2html   latex2rtf    pplatex      rtf2latex2e
    
    If you meant `latex' precisely:
    
    Installing TeX from source is weird and gross, requires a lot of patches,
    and only builds 32-bit (and thus can't use Homebrew deps on Snow Leopard.)
    
    We recommend using a MacTeX distribution: http://www.tug.org/mactex/
    

    Macports' texlive port and MacTeX are both based on the latest TeXlive distribution, MacTeX is very complete (https://www.tug.org/mactex/whatsinthepackage.html) whereas you have much more granularity with all the texlive-* ports of macports (https://www.macports.org/ports.php?by=name&substr=texlive).

  2. With macports, all the above mentioned packages can be installed/updated through the usual port install and port update commands. However, if you need a package that is not pre-packaged by macports then you get absolutely no help (but I doubt that there are many).

  3. I used to use the macport-based texlive distribution, since it allowed me to avoid downloading stuff I didn't need (BibDesk or Excalibur for instance). Now I'm using homebrew and MacTeX, which is better integrated with MacOS X in general (fonts for instance). Disk-space (bandwidth) vs. integration.

Basically both are good solutions so it mostly depends on what else you do… I switched from macports to homebrew for reasons not at all related to TeX, hence my switch in TeX providers.


I just installed MacTeX with homebrew.

brew install Caskroom/cask/mactex

That provided me with /Application/TeX, containing TeXShop program and the utilities.

However, I am missing the pdflatex tool from command line, and that also produces errors in the TeXShop program:

After searching a little bit around, I found out that the missing utilities were actually bundled with MacTeX, and located in Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin.

Great! I will just create a symbolic link to from that location to /usr/texbin. Turns out that I cannot (even with root), create files in /usr on a modern Macintosh (since El Capitan), because of the System Integrity Protection. I considered disabling it with csrutil, but choose rather to try to symlink the required binaries into /usr/local/bin.

ln -s /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin/pdflatex /usr/local/bin 

Did the trick for me.

*note I found a issue in the brew/caskroom repo that might be related. https://github.com/caskroom/homebrew-cask/issues/20592 Feel free to update this answer if it gets fixed