When I am trying to 'quick build' my document in TeXstudio 2.1 on Mac OS X 10.6.8, I am getting and error: could not start the command (with 'quick build' options being LaTeX + DviPdf + PdfViewer). I know that this question has resonated across different forums:

and I realized that the key to solution is to set the right commands paths in options > configure texstudio > commands - the image below shows exactly how I set it up. So I set ALL command paths to /usr/texbin/latex, Now, the error disappears, TeXstudio starts the compilation process, but never finishes - it simply freezes in the compilation process.

I have to add I compiled the document in TeXShop and it works fine, so... it must be something I messed up with the command paths...

screen capture texshop commands paths

  • 2
    /usr/texbin is fine, but it must be followed by the right tool; for PdfLaTeX it should be pdflatex, for instance.
    – egreg
    Dec 17, 2011 at 21:37

2 Answers 2


Paths for a MacTeX distribution

The following settings should work:

latex       "/Library/TeX/texbin/latex" -synctex=1 -interaction=nonstopmode %.tex    
dvips       "/Library/TeX/texbin/dvips" -o %.ps %.dvi
ps2pdf      "/usr/local/bin/ps2pdf" %.ps    
MakeIndex   "/Library/TeX/texbin/makeindex" %.idx    
BiBTeX      "/Library/TeX/texbin/bibtex" %.aux    
pdfLaTeX    "/Library/TeX/texbin/pdflatex" -synctex=1 -interaction=nonstopmode %.tex    
dvipdf      "/Library/TeX/texbin/dvipdfm" %.dvi    
dvipng      "/Library/TeX/texbin/dvipng" -T tight -D 120 %.dvi    
Metapost    "/Library/TeX/texbin/mpost" --interaction nonstopmode     
DVI viewer  open %.dvi    
PS viewer   open %.ps    
PDF viewer  open %.pdf    
Ghostscript /usr/local/bin/gs "?am.ps"    
Asymptote   "/Library/TeX/texbin/asy" %.asy

If you have updated to a recent MacTeX and need to change them all at the same time, you can quit out of the app and edit the texstudio.ini file which is stored in ~/.config/texstudio. This is a plain text file and you can then do a global replace of the old path with /Library/TeX/texbin.

Paths for other types of distributions

If you are using any other TeX distribution, for example MacPorts or Fink, you will need to change /usr/texbin/ to the relevant path in that particular distribution. In MacPorts it is /opt/local/bin/.

I would not recommend using such a distribution, however, as they are generally harder to keep updated.



  • 3
    I've added -synctex=1 also to the PdfLaTeX entry, which of course is missing from the screen shot, but is highly convenient.
    – egreg
    Dec 17, 2011 at 21:47
  • Excellent, thank you Alan and @egreg - it works perfectly! Dec 17, 2011 at 22:18
  • Thanks!! I had %.aux inside of double quote, I have changed to "/usr/texbin/bibtex" %.aux and all is ok.
    – user14610
    May 15, 2012 at 11:54
  • my configuration is exactly what you typed up there, but still I get the error "could not start the command". I am using a newer version of TexMaker with MacTex. Where am I doing wrong?
    – user23243
    Dec 12, 2012 at 11:00
  • As of Os X 10.11 all paths starting with /usr/texbin/ should be changed to /Library/TeX/texbin/.
    – Aydin
    Oct 29, 2015 at 14:52

Note that old paths in /usr are not valid anymore in Os X 10.11+. All paths starting with /usr/texbin/ should be changed to /Library/TeX/texbin/.

  • One of the nice things about Stackexchange is that everyone can edit the content. So instead of adding this as an answer, you could have just edited my original answer to reflect the change. (I've don't that now.)
    – Alan Munn
    Jan 28, 2016 at 1:54

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.