0

I have installed mactex because I need pdflatex:

MyName-MacBook-Pro:~ namesurname$ brew install --cask mactex
Warning: Cask 'mactex' is already installed.

To re-install mactex, run:
  brew reinstall --cask mactex
MyName-MacBook-Pro:~ namesurname$ 

but once I type mactex or which pdflatex on my terminal it says "command not found" for the first and nothing for the second, respectively:

MyName-MacBook-Pro:~ namesurname$ mactex
-bash: mactex: command not found
MyName-MacBook-Pro:~ namesurname$ which pdflatex
MyName-MacBook-Pro:~ namesurname$ 

How can I use/open mactex and/or pdflatex ??

3
  • 1
    Mactex is only the installer. It set up two things : the texlive tex distribution, including the pdflatex executable and the texshop editor. You should run the latter to edit your code, and it will invoke the former when pressing on "compile" or "compose" or "typeset".
    – Jhor
    Apr 27 at 17:26
  • 2
    There's no real need to install MacTeX via homebrew; it's simpler to install it using the MacTeX installer package. This may or may not be the source of your problem, because as I understand it the homebrew cask just runs the regular MacTeX install package. But if you've installed it correctly which pdflatex should return /Library/TeX/texbin/pdflatex. I would uninstall the homebrew version and use the package installer in the link I suggested.
    – Alan Munn
    Apr 27 at 17:46
  • 1
    Thanks a lot to everyone! Thanks @AlanMunn, I followed your instructions in this order, (1) brew uninstall mactex, (2) download MacTeX.pkg from MacTex website and it works! If I type which pdflatex from my Terminal, I get the following: /Library/TeX/texbin/pdflatex
    – limone
    Apr 28 at 13:08

1 Answer 1

1

Solution provided by @AlanMunn in the comments:

  1. brew uninstall mactex,
  2. download MacTeX.pkg from MacTex website

Now, if I type which pdflatex from my Terminal, I get the following: /Library/TeX/texbin/pdflatex

Thanks a lot Alan Munn!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.