I am having a problem running pdflatex on the command line. When I install a new package using tlmgr it puts things in the the directory /usr/local/texlive/2014/texmf-dist/tex/latex/ which is fine. When I compile my .tex files from a program like TexShop everything works fine, but when I try to run pdflatex from the commandline I run into issues. It can't find the appropriate .cls and other things. I went looking into the .log files to see what was going on. When I compline from TexShop the start of the .log file says

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) 
(preloaded format=pdflatex 2014.5.25)  

but when I use pdflatex on the command line I get

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/MacPorts 2014_1)
(preloaded format=pdflatex 2014.10.13) 

I was messing around with Macports a few months back and might have installed some stuff for Latex but I don't remember. I updated all of my MacPort stuff thinking that something was out of date but that didn't change anything. It appears that the TeX Live 2014/MacPorts 2014_1 is looking for files in /opt/local/share/texmf-texlive/tex/latex/ which doesn't have the new packages I installed using tlmgr. I would like pdflatex to look for files in /usr/local/texlive/2014/texmf-dist/tex/latex/ where all of my packages are. I also don't know what is going on with the Tex Live and the Tex Live / MacPorts but if I can get pdflatex to work then it doesn't really matter. Thanks for your time, and I am sorry if I haven't provided enough information.

closed as unclear what you're asking by egreg, Mensch, user11232, moewe, Svend Tveskæg Sep 17 '15 at 15:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome to TeX.SX! Remove the MacPorts TeX Live, that's all. I removed MacPorts from all my machines time ago, to be honest. – egreg Oct 19 '14 at 15:57
  • @egreg Do you use a package manager for your mac machines? – eitanlees Oct 19 '14 at 16:03
  • I use homebrew and I feel no nostalgia for MacPorts or Fink. Can you show the output of echo $PATH from a terminal window? – egreg Oct 19 '14 at 16:06
  • /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/texbin – eitanlees Oct 19 '14 at 16:12
  • Add export PATH=/usr/texbin:${PATH} at the end of your .bashrc file and MacTeX binaries will be used. – egreg Oct 19 '14 at 16:14

Browse other questions tagged or ask your own question.